Skip to main content
January 27, 2025

The PDF landscape for DITA content

I found this article in the 2010 (!!) archives and have updated it. Surprisingly, the general gist is still accurate.

There are numerous alternatives for producing PDF output from DITA content. The approach you choose will depend on your output requirements—do you need images floating in text, sidebars, and unique layouts on each page? How often do you republish content? How much content do you publish? Do you need to create variants for different audiences? Do you provide content in multiple languages?

This article describes several common approaches and what requirements they support best. Your options include the following:

  • DITA Open Toolkit (OT)
  • CSS-based tools, such as Prince
  • InDesign
  • Others

DITA Open Toolkit

The DITA Open Toolkit includes support for PDF output via XSL-FO. By default, the output created through the Open Toolkit is ugly, and customizing the XSL-FO code is a daunting task. The advantages of the Open Toolkit are automation and licensing cost. You run the Open Toolkit from the command line, and it’s possible to integrate the Open Toolkit with automated build systems. If you use the free FOP processor, you can generate PDF without any software licensing costs. The commercial FO processors cost up to $5,000 but have better functionality than FOP. Configuring the Open Toolkit to produce even reasonably attractive pages requires significant technical skills and is not for the faint of heart.

Pros:

  • Extensibility
  • Automation

Cons:

  • Specialized skillset
  • Problems with edge cases, especially with open source rendering engines (pagination controls, tables, Asian language indexing, bleeds, mixed columns, one-off formatting)

CSS

You can run DITA XML through CSS rendering engines, such as Prince. AEM Guides includes a “native PDF” generator that is CSS-based. oXygen also provides CSS capability.

Pros:

  • CSS is much easier than XSL-FO

Cons:

  • More problems with edge cases 

InDesign

It’s possible to export DITA content to InDesign. Once the information is in InDesign, you can see exact layout and pagination and make adjustments before creating the PDF output. This workflow increases the cost of production, but may be worthwhile for highly designed publications.

Pros:

  • Ability to do final layout tweaks

Cons:

  • Requires a manual pass through the layout files
  • Very expensive to configure and maintain

Other solutions

There are a variety of commercial and open source solutions that let you convert HTML to PDF, or generate PDF on the fly from a web server. Typifi supports InDesign publishing. Miramo offers a graphical user interface for PDF output design. Antenna House has both XSL-FO and CSS processors.

You can get creative within your infrastructure. For example, you could use an existing Markdown publishing environment. If you have Markdown to PDF working, you just need to export your DITA content to Markdown and feed it into the Markdown/Git pipeline.

Next steps

The following factors will drive your decisions:

  • Automation. If automated production is a priority, avoid the page layout tools and the temptation to reach into the intermediate layout files. Instead, consider the automated solutions (DITA Open Toolkit and CSS) and choose your processor based on formatting requirements.
  • Formatting requirements. Are ligatures, attractive justification, and hyphenation critical? Do you have requirements, such as mixed columns on a single page, that the automated processors cannot support? You probably need page layout software. On the other hand, if your formatting requirements are simple, you can probably use any of the options discussed here; look at other evaluation factors.
  • Difficulty of configuration. If you want to minimize the difficulties in formatting your output, consider CSS, Typifi, or Miramo.
  • Formatting adjustments. If hand-tweaking the formatting before generating the final output is a requirement, you need an editable intermediate file (such as InDesign).
  • Cost.
  • Existing templates. If you already have formatting templates in a specific tool, consider using that tool to produce your DITA PDF output. For example, if you have existing FrameMaker or InDesign templates that meet your requirements, you might target output to those tools.
  • Language support. If you need to support a wide variety of languages, verify that your languages are supported or can be supported by the tools you are considering. Look at the process for adding languages and consider sustainability.

Still not sure what’s next? Reach out to Scriptorium and we can help.

"*" indicates required fields

Data collection (required)*
This field is for validation purposes and should be left unchanged.

This article is a condensed version of Creating PDF files from DITA content, originally published in STC Intercom in May of 2010.