How to Obtain PDF Output from DITA Content using a Command Line

If you are using Oxygen PDF Chemistry distributed as a standalone product (installed outside Oxygen) and you want to obtain PDF output from DITA content, you need to install an additional plugin (dita-ot-css-pdf) so that all the references are resolved and expanded properly. This plugin makes it possible to use the Oxygen PDF Chemistry processor to obtain DITA to PDF output by running the DITA OT from a command line interface.

To process and publish DITA to PDF using CSS and Oxygen PDF Chemistry, follow this procedure:

  1. Install the Chemistry processor.
  2. Add a reference to Chemistry's parent folder in your system's PATH environment variable.
  3. Download and install the DITA Open Toolkit (http://www.dita-ot.org/download).
  4. Download the dita-ot-css-pdf plugin that is available on GitHub (https://github.com/oxygenxml/dita-ot-css-pdf).
  5. Install the plugin in the DITA Open Toolkit (http://www.dita-ot.org/dev/topics/plugins-installing.html).
  6. Run the DITA Open Toolkit from a command line and make sure you specify the format to be pdf-css, the processor type to be chemistry, and the path to your main DITA map.
    For example:
    dita-ot-dir/bin/dita --input=path/to/my.ditamap --format=pdf-css -Dcss.processor.type=chemistry --output=path/to/output/folder