As you know DITA-OT can convert collection of topics into various output format such as pdf,xhtml or webhelp. However, there is always a need to create pdf outputs with your company logo, specific header and footer, probably one that is matching with your corporate literature and website theme. You can achieve this by creating your own plugin.
Basically DITA-OT transforms DITA Topics Files into an intermediate format and then sends it to the fo processor to convert directly into the pdf format.
We can customize fo plugin to generate outputs as per our needs. However, one should never touch the original fo plugin but create one for own needs.
In the year 2008 Jarno Elovirta had written a tool to automate DTD and specialization generation. Later on it was converted into custom pdf plugin generator. Though it has few limitations I found it very useful as a starting point while creating your first pdf plugin. In other words, for creating the skeleton of pdf plugin.Here is a jump start tip for creating your own pdf plugin.
1. Open Jarno Elovirta’s PDF Plugin generator that is hosted at following url
2. Click Next, Select page size, margins and columns as shown in the figure 1.2
3. Though It doesn’t have much detailed options to customize header and footer but you can select some for header content and other layout options as shown in the figure 1.3
4. Select style attributes as shown in the figure 1.4 and click Next.
Further, there is an option to setup cover page however, I recommend ignoring this selection. You may select the task labels checkbox. Remember we are just creating basic pdf plugin, once your basic plugin is ready there are more sophisticated ways to customize the cover page.
5. Finally, enter the Plugin ID and desired transtype.You may specificy the Plugin version too. Click Generate to download your newly created plugin.
6. Unzip your the downloaded plugin file and copy entire plugin folder into DITA-OT install folder’s plugins subfolder. My plugin’s downloaded and unzipped folder name is com.mycompany.website-ug.
7. Simply, place the folder at following location.
8. Now, open custom.xsl from the following location to do some corrections.
Select entire section under <!–cover–> as shown in the figure below and delete. Save the custom.xsl file.
9. Now, your custom pdf plugin is ready to generate pdf output.From the <DITA-OT_INSTALL_FOLDER> run startcmd.bat and enter the following command
Go and check the out folder under the <DITA-OT_INSTALL_FOLDER> for generated pdf output. I hope that sharing this jump start tip for creating DITA-OT pdf plugin will help helpful so, later on you can explore more sophisticated customization.