Edit online

Customizing PDF Output Using CSS

The publishing process is driven by a customization CSS.

Warning: You should not edit the CSS stylesheet from DITA-OT-DIR/plugins/com.oxygenxml.pdf.css/css/print. Instead, create your own customization.
To change the styling of the output for the DITA Map PDF - based on HTML5 & CSS and the DITA PDF - based on HTML5 & CSS transformation scenarios:
  1. Create the CSS file that will contain all of your customizations. It is recommended to create this file in your project directory so you can edit it easily.
    Tip: If you use the default Chemistry processor in Oxygen XML Editor/Author, you can use LESS instead of CSS. In this case, the customization files should have the .less extension.
  2. Add your custom CSS rules. As a good starting point you can:
    • Check the various topics in this section for assistance with specific types of customizations.
    • Use the Oxygen Styles Basket to generate basic selectors for common content.
  3. For linking the CSS file, you have two options:
    • Create a publishing template, create the customization CSS file inside the template folder, and link it to the publishing template descriptor. For assistance, see Publishing Templates.
    • Choose an existing publishing template, then edit the scenario and set the full path to the custom CSS file as the value of the args.css parameter. The rules from custom CSS will override the rules from the template CSS files.
  4. Run the transformation scenario.