Prince creates PDF metadata from the content of the XHTML metadata elements.
The content of the <title>
element is used for the
document title, while the <meta>
element can be used to
specify the document author, subject, keywords, date, and generator
application:
XML
<html>
<head>
<title>Cooking with Cabbage</title>
<meta name="author" content="John Smith"/>
<meta name="subject" content="An interesting book about food"/>
<meta name="keywords" content="cabbage, cooking, eating"/>
<meta name="date" content="2009-04-01"/>
<meta name="generator" content="MyReportingApp"/>
</head>
Additionally, XMP metadata can be added to a PDF file from an XMP file. This
file needs to be passed to Prince either via the --pdf-xmp
command-line option, the prince-pdf-xmp CSS property, or it
can be specified in JavaScript as a data URL string via the PDF.xmp
property.
Prince includes data from the <x:xmpmeta> element and its contents. The xpacket processing instructions are ignored, as Prince generates those itself when it produces the PDF file.
Please note that the PDF.xmp
JavaScript property, the prince-pdf-xmp and the --pdf-xmp
command-line option
require either a URL pointing to an XMP file, or an encoded data:
URL.