10.07.2015 Views

Download - Multivac!

Download - Multivac!

Download - Multivac!

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

9.6 Tagged PDFTagged PDF is a certain kind of enhanced PDF which enables additional features in PDFviewers, such as accessibility support, text reflow, reliable text extraction and conversionto other document formats such as RTF or XML.PDFlib supports Tagged PDF generation. However, Tagged PDF can only be created ifthe client provides information about the document’s internal structure, and obeys certainrules when generating PDF output.Note PDFlib doesn’t support custom structure element types (i.e. only standard structure types as definedby PDF can be used), role maps, and structure element attributes.Cookbook Code samples regarding Tagged PDF issues can be found in the document_interchange categoryof the PDFlib Cookbook.9.6.1 Generating Tagged PDF with PDFlibCookbook A full code sample can be found in the Cookbook topic document_interchange/starter_tagged.Required operations. Table 9.18 lists all operations required to generate Tagged PDFoutput. Not calling one of the required functions while in Tagged PDF mode will triggeran exception.Table 9.18 Operations which must be applied for generating Tagged PDFitemTagged PDF outputdocument languagestructureinformationPDFlib function and option requirements for Tagged PDF compatibilityThe tagged option in PDF_begin_document( ) must be set to true.The lang option in PDF_begin_document( ) should be set to specify the natural language of thedocument. It should initially be set for the document as a whole, but can later be overridden forindividual items on an arbitrary structure level.Structure information and artifacts must be identified as such. All content-generating API functionsshould be enclosed by PDF_begin_item( ) / PDF_end_item( ) pairs.Unicode-compatible text output. When generating Tagged PDF, all text output mustuse fonts which are Unicode-compatible as detailed in Section 5.4.4, »Unicode-compatibleFonts«, page 111. This means that all used fonts must provide a mapping to Unicode.Non Unicode-compatible fonts are only allowed if alternate text is provided for the contentvia the ActualText or Alt options in PDF_begin_item( ). PDFlib will throw an exceptionif text without proper Unicode mapping is used while generating Tagged PDF.Note In some cases PDFlib will not be able to detect problems with wrongly encoded fonts, for examplesymbol fonts encoded as text fonts. Also, due to historical problems PostScript fonts withcertain typographical variations (e.g., expert fonts) are likely to result in inaccessible output.Page content ordering. The ordering of text, graphics, and image operators which definethe contents of the page is referred to as the content stream ordering; the contentordering defined by the logical structure tree is referred to as logical ordering. TaggedPDF generation requires that the client obeys certain rules regarding content ordering.The natural and recommended method is to sequentially generate all constituentparts of a structure element, and then move on to the next element. In technical terms,the structure tree should be created during a single depth-first traversal.216 Chapter 9: Generating various PDF Flavors

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!