This page describes a proposal for FOP-specific extensions to XSL-FO to activate PDF-specific features.
- Requested by Jiri Tyr: Initial Page View (-> PDF Document Catalog, /PageMode)
- Document Catalog's /PageLayout, /OpenAction
- ViewerPreferences dict: all values
Andreas proposed fox:pdf-catalog, but since this is highly PDF-specific I'd follow the pattern we used for formats like PCL and PostScript.
pdf:dictionary / pdf:entry
Taking into account the suggestion made by Paul Womack, how about something slightly more generic, and more closely resembling PDF, like:
The type attribute is the hint to make sure the catalog dictionary is treated special, and its entries are added to the PDF Document Catalog. The same extension can easily be used for other dictionaries, like ViewerPreferences. Using the same terminology as in the PDF Reference seems to make sense, as it's a PDF extension. Using the exact same possible values could lead to an easier translation to PDF.
Thinking about it some more, and starting to prototype this idea, the entry object seems to be the key, as it is conceivable to also insert a dictionary by specifying it entirely as a PDF expression. Makes me wonder to what extent we should validate the contents... Ultimate flexibility vs. the risk of producing corrupt PDF in case of the slightest glitch/typo
For a prototype implementation, check out http://issues.apache.org/bugzilla/show_bug.cgi?id=45390
Maybe the abstract pdf:entry object would better be replaced by strictly typed objects, to make the representation a bit more compact...?