Edit online

Missing Title when Publishing Single Topics with PDF/UA-1

Problem

When publishing a single topic using the DITA PDF - based on HTML5 & CSS transformation scenario and the pdf.accessibility parameter set to yes, the following error appears: PDFConformanceException: PDF/UA-1 requires the title to be set.

Cause

By default, the DITA PDF - based on HTML5 & CSS transformation scenario does not set the topic title in the metadata.

Solution

The title must be declared by using the following CSS rule:
*[class ~= "topic/topic"] > *[class ~= "topic/title"] {
  -oxy-pdf-meta-title: content();
}