You are using AEM Guides and you publish the DITA content using DITA-OT.
When using DITA-OT, sometimes you need to use your own version of DITA-OT. The product supplies a specific version of DITA-OT in its release (the latest one when the product version gets released, e.g. version 3.8 of AEM Guides includes DITA-OT version 3.3.2)
There are scenarios in which you may want to customize the DITA-OT supplied with product, those scenarios can be:
Things to Remember when adding such customization
There are few things to keep in mind to make sure the integration of customized DITA-OT works successfully in AEM Guides. These pointers are scenario dependent, which are listed below
Scenario 1: Integrating a new plugin to out-of-the-box DITA-OT
Firstly, the zip file you created should have folder named "DITA-OT" in it containing the plugins folder, it is important as system is internally dependent on this, refer screenshot below:
Secondly, when you run the integrator to install custom plugin, recommendation is to do this on a Mac/Linux OS to avoid file separator issues during publishing. The plugin integrated on mac/linux OS is compatible to both Windows and Unix setup
Thirdly, the updated zip file should be of type "nt:file" (this should be the primary type of zip file when uploaded to AEM). To elaborate, do not use this zip file to install as AEM package (using package manager) rather upload this zip to desired path in AEM (e.g. /apps/test/dita_resources/DITA-OT) using a webdav tool or through code deployment
Scenario 2: Using a different DITA-OT version than out-of-the-box
Generally this is required because either the implementation team desires to use the latest features in newly released DITA-OT version, or the implementation team already uses another version of DITA-OT that has their custom plugins implemented on, and moving to different version requires refactoring. Hence, in those scenarios the implementation team generally will have their own copy of DITA-OT. Following points should be considered when uploading a custom DITA-OT into the system:
Firstly, the environment variables within DITA-OT base plugin are updated, as AEM uses a temporary path that is different than what is configured in DITA-OT supplied on open source or use in other systems. So, make sure following environment variables within the DITA-OT are aligned to AEM Guides working paths, e.g. for versions 3.5.1+ of AEM Guides you will have to make following changes to the custom DITA-OT:
You will notice these paths are also printed in the DITA-OT error log, for e.g. following snippet from DITA-OT log prints the values of temporary path that you can validate before changing these variables
Secondly, in DITA-OT version 3.x and above, you may notice that the PDF output generation throws an error like "taskdef class org.dita.index.IndexPreprocessorTask cannot be found using the classloader AntClassLoader". This is generally because of the CLASSPATH issues with the custom plugins. To fix this, update the DITA Profile in AEM to add library paths containing the jars "ant-launcher.jar" and "index.jar", refer screenshot below:
Thirdly, update the xerces.jar file as per instructions given in section "Patch Xerces Jar while using custom DITA-OT for publishing" of Best Practices Guide. This is for performance improvement on DITA-OT publishing.
Some additional references
Hi @DivrajSingh, While modifying the out-of-the-box DITA-OT.zip (AEM), there are some permissions (chmod) that need to be changed in order to make it work. Else the plugin will not work upon upload into AEM environments (running linux kernel)
Can you please document those steps as well?
The modified DITA-OT has to be uploaded to AEM repository. Extraction of the DITA-OT is done by AEM process so it should get write permissions for the AEM user (using which AEM java process is running).
Were you trying to upload the custom DITA-OT directly into the AEM extracted path? (/crx-quickstart/profiles/dita-ot...)
we are followed the steps what you given for DITA-OT customized dita-ot version but we are getting this error while generating PDF output (attached the screenshot ). Can please give the solution to this.
@kondisrinivasu : please share:
Thankyou for the reply @DivrajSingh
@kondisrinivasu : I have replied to your message in inbox but here is the summary:
- The DITA-OT.zip is missing the DITA-OT folder (you need to zip the folder itself)
- Also the DITA profile you mentioned in the word document, I observed that you did not assign any path to the profile
Thankyou for the reply @DivrajSingh
We are followed the steps what you are provided We are able to generate output in other formats like (HTML etc) but we are not getting MathML equations in final output and we are getting error while generating Pdf output.
Can please provide solution to this.
@kondisrinivasu : The error indicates that the PDF plugin itself is not configured in DITA-OT properly so MathML is secondary issue for you as of this state.
The steps defined in this post are all complete. For the plugin you shared: the configurations done are not correct in the DITA-OT plugin and the output presets.
You are already in connection directly with us - recommend you to continue this conversation offline as the issue you are facing is more in your setup which has to be debugged!
@Beaula123 : it seems you are trying to publish the PDF using default settings which uses the plugin "fm-pdf" which is not available in the custom DITA-OT that you have configured in AEM.
The error you shared indicates the supported output formats/plugin names like "bcpdf" or "sym_bcpdf"
You can configure this on the output preset in the field "Transformation name", refer image below:
I hope this helps.