PDF Plugin Creation – Part 2
Now, let’s install the plugin, print a sample PDF and change some settings in Oxygen so the plugin is easy to access everytime you need to publish something.
1. Copy the Plugin to the Oxygen DITA-OT Folder
This instruction is for MacOS, but it will be very similar for Windows. Go to Applications –> Oxygen XML Editor –> frameworks –> dita –> DITA-OT2.x –> plugins and copy inside of that folder, your generated folder.
2. Creating a New Project
Open Oxygen. We will be creating a new project, which I will be calling ClientX. Go to Project –> New Project. Name it and Save.
3. Load the Sample DITA Project that Comes with Oxygen
Right click on the project. Click Add Folder… Choose Applications –> Oxygen XML Editor –> samples –> dita.
4. Printing the Flowers Sample
Open the file flowers.ditamap under the folder dita–>flowers. On your Association Scenarios panel, on the right, select DITA Map PDF. Click on the Apply associated scenarios icon (arrow below).
Note: In newer versions of Oxygen, the scenario is called DITA Map PDF – based on XSL-FO.
5. Plain PDF Output
After a short wait, a PDF will be generated. Very plain, but this is important so you can see that all is working as it is supposed to.
5.1 Cover Page
5.3 Sample Page 1
5.4 Sample Page 2
6. Let’s Install Our Plugin
Now, unclick DITA Map PDF and click the scenario called Run DITA-OT Integrator. Click on the Apply associated scenarios icon.
7. Make the Plugin Available in Our List
7.1 Click on the + Sign. Click on DITA-OT Transformation
7.2 From the List, Select the Name of Your Newly Created Transformation
7.3 Add a Name
You can name your scenario any way you want. I usually use something that it is easy to identify. In this case, I will be using PDF Regular Books.
7.4 Allocate More Memory
Let’s allocate more memory for the JVM machine. This will be useful for bigger PDFs. The default value is 384m, let’s use 1000m. Click OK once done.
8. PDF Regular Books is Now Available
As you can see on the right panel, PDF Regular Books is available and you can use it anytime you load any ditamap.
Note: These settings are stored in the project named ClientX. If you are creating a new project, you will have to re-do Step 7 above.
Click on the Apply associated scenarios icon.
9. Custom PDF Output
9.1 Cover Page
This looks identical to the default one. We will customize it, adding a background and changing the font family, size and color.
This one definetively looks different. There are different sizes, colors and bolding, depending on the nesting.
9.3 Sample Page 1
This is also a lot different, but we will customize it further, adding breaks between chapters, colors to the head of the tables and much more.
9.4 Sample Page 2
10. What else?
We have just started. There is a lot we will be adding in coming parts of these series.