Adding PDF document properties from Bookmap metadata
During my presentation on producing PDFs from Bookmaps, the question came up as to whether the OT fills in the PDF document properties from the information in bookmeta. The answer is that this doesn't happen with the base OT.
However, one of the attendees, Simcha Gralla, sent me the following information about how this information can be pushed to the PDF.My thanks to hm for sharing this information with all of us. Basically you'll have to write an XSLT to handle how the different processors handle providing that information.
With FOP, looks like it has to be done with Dublin Core; not sure if it populates the Document Info or other fields in the PDF: http://xmlgraphics.apache.org/fop/1.0/metadata.html -- still looking for better examples
Antenna House has a document-info extension (got to love those extensions): http://www.antennahouse.com/xslfo/axf3-extension.htm#axf.document-info
<axf:document-info name="title" value="AH Formatter V5.1 - Online Manual" />
<axf:document-info name="subtitle" value="PDF version" />
<axf:document-info name="author" value="Antenna House, Inc." />
XEP is similar: http://www.renderx.com/reference.html#Document_Information
This extension permits passing a set of name/value pairs to the generator of the output format. A typical application is setting PDF document info fields (‘Author’ and ‘Title’). Implementation uses two extension elements: <rx:meta-info> and <rx:meta-field>.
<rx:meta-info>
This element is merely a container for one or more <rx:meta-field> elements. It should be the first child of <fo:root>.
<rx:meta-field>
This element specifies a single name/value pair. It has two mandatory attributes: name and value. Current implementation of the PDF and PostScript generators recognize six possible values for name:
name="author"- fills the ‘Author’ field in the resulting PDF file with a string specified by the value property.
name="creator" - fills the ‘Creator’ field.
name="title" - fills the ‘Title’ field.
name="subject" - fills the ‘Subject’ field.
name="keywords" - fills the ‘Keywords’ field.
name="publisher" - fills the ‘Publisher’ field (in XMP metadata only).
The ‘Producer’ field in the PDF file is set to "XEP 4.18"; there is no means to control it from the source file. All other values for name are treated as custom meta-fields and appear in the same dictionaries in PostScript and PDF as predefined meta-fields. Unicode values for name are not supported.
In the PostScript generator module, the document info fields are added using the pdfmark operator. The respective fields are filled when PostScript is converted to PDF using Adobe Acrobat Distiller or GhostScript.
- Julio_Vazquez's blog
- Login to post comments
- 7504 reads