Using a custom set of XML tags inside your HTML, you can insert both custom metadata as well as instructions for how the PDF would be viewed in a PDF viewer application (subject of course to that application supporting those features).
You use the (optional) tag <pdfproperties> and within that tag you
can insert <metainfo> and <pdfpreferences>
sections as shown in the instructions below. Within the
<metainfo> tag, you can add <prop> tags
with @name, @value attribute pairs with the data you wish
to store in the PDF metadata. Anything without one of the recognized, standard PDF
names (author, title, subject,
creator, keywords) are stored in custom metadata in
the PDF.
The <pdfpreferences> section allows you to insert one or more
<pref> tags with specific @name,
@value pairs that control the way the resulting PDF is displayed
with a viewer that supports standard PDF view attributes. The support
name, @value pairs are listed below and grouped into
all the available categories:
These options let you control some general information about the generated PDF.
bookmarks - sets whether PDF bookmarks are generated or not. The default
is "false" for Cloudformatter. You can set @value to "true" if you want
bookmarks in PDF. Note that bookmarks are only generated for interpreted
hierarchical information. All h1 elements and there following
h2 elements and so on. Skipping levels will break the sequence and
the bookmarks will not be correct.
pdf-version - sets the PDF version number. The default is version 1.5
for Cloudformatter but you set @value to values like "1.3", "1.4",
"1.6" or "1.7" if you wish to change the version. Be aware thar some other features
could be disabled by setting the version too low.
compress - sets whether the PDF is compressed or not. The default is
"true" for Cloudformatter. You can set @value to "false" if you want
uncompressed PDF.
linearize - sets whether the PDF is linearized or not. The default is
"false" for Cloudformatter. You can set @value to "true" if you want to
optimize a long PDF for web view.
These options let you control how the PDF when opened appears to the end user.
view-mode - Choose from one of the following:
auto - If there are bookmarks in the document, the bookmarks pane
is displayed. Otherwise, all auxiliary panes are hidden.show-none - All auxiliary panes are hidden.show-bookmarks - The bookmarks pane is displayed.show-thumbnails - The thumbnails pane is displayed.full-screen - The document is displayed in full screen-mode.initial-zoom - Choose from one of the following:
auto - Page scaling is not specified.fit - The page is scaled to fit completely into the view port.fit-width - The page is scaled so that its width matches the width
of the view port.fit-height - The page is scaled so that its height matches the
height of the view port.### or ####% - The page is scaled by the number or
percentage specified.page-layout - Choose from one of the following:
auto - Uses settings of viewer application.single-page - Displays one page at a time.continuous - Displays pages continuously in one column.two-columns-left - Displays pages continuously in two columns, with
odd-numbered pages to the left.two-columns-right - Displays pages continuously in two columns,
with odd-numbered pages to the right.two-pages-left - Displays pages in two columns, by two pages at a
time, with odd-numbered pages to the left. two-pages-right - Displays pages in two columns, by two pages at a
time, with odd-numbered pages to the right.viewer-preferences - A comma separated list of the following
possibilities:
hide-toolbar - Hides the viewer application's tool bars when the
document is active.hide-menubar - Hides the viewer application's menu bar when the
document is active.hide-window-ui - Hides user interface elements in the document's
window (such as scroll bars and navigation controls), leaving only the
document's contents displayed.fit-window - Resizes the document's window to fit the size of the
first displayed page.center-window - Positions the document's window in the center of
the screen.display-document-title - Controls whether the window's title bar
displays the document title taken from the "title" metadata field.These options allow you to specify owner and user security in the PDF output. User-level security can inject a password to be used to open the PDF, while owner-level security can control what can be done with the PDF (like printing it or copying the data from it).
userpassword - Sets the user password that must be entered to view the
PDF. There are no options, the @value passed is the password to be
used.
ownerpassword - Sets the owner password that must be entered to enable
advanced processing of the PDF. There are no options, the @value passed
is the password to be used. An ownerpassword is used to lock down certain privledges
that an owner will grant to a recipient of the PDF. Without the owner password,
recipients can be restricted from certain things. By default they are restricted
from everything, and you can then specify what additional things you allow by using
userpriviledges.
userpriviledges - A comma separated list of the following
possibilities:
print - Enables printing the document. modify - Enables editing the document. copy - Enables copying text and images from the document to the
clipboard. annotate - Enables adding notations to the document and changing
the field values. These allow you to specify crop marks, bleeds and registration marks to be applied to the PDF.
crop-offset - specify offsets from the meaningful content on the page to
the edges of the physical media (/MediaBox entry in the PDF page dictionary). Its
value is a series of 1 to 4 length specifiers that set offsets from the edges of the
page area to the corresponding edges of the /MediaBox. Rules for expanding the value
are the same as for the padding property in CSS.
bleed - specify the bleeds — an extra space around the page area into
which the contents of the page may protrude (/BleedBox entry in the PDF page
dictionary). Its value is a series of 1 to 4 length specifiers that set offsets from
the edges of the page area to the corresponding edges of the /BleedBox. Rules for
expanding the value are the same as for the padding property in CSS.
crop-mark-width - defines line width for the crop marks, setting it to 0
disables drawing of crop marks.
bleed-mark-width - defines line width for the bleed marks, setting it to
0 disables drawing of bleed marks.
printer-mark - specify additional SVG images to be drawn in the offset
area surrounding the page (specified by crop-offset and bleed parameters). Printer
marks are clipped to the outside of the bleed rectangle. The @value is
a URL to an SVG you have. This sample has two URLs (one for a colorbar and one for a
registration mark) you can also use if you like.
The following code is what is behind this page for producing the PDF. Of course, you would only see the things supported by your PDF viewer you use. If you wish to see them all in action, then use "download" and Adobe Reader to view the PDF.
Recent changes in some browsers will not treat this XML as XML. Instead it tries (incorrectly) to not close tags. For best results, be sure to use open and close tags and not a self-closing tag.
<pdfproperties style="display:none;">
<metainfo>
<prop name="author" value="Xportability LLC"></prop>
<prop name="title"
value="Xportability Cloudformatter: Showing Custom
PDF Properties"></prop>
<prop name="subject" value="A Cloudformatter Document"></prop>
<prop name="creator" value="css2pdf@cloudformatter.com"></prop>
<prop name="keywords" value="CSS, PDF, Cloudformatter"></prop>
<prop name="custom1" value="value1"></prop>
<prop name="custom2" value="value2"></prop>
<prop name="custom3" value="value3"></prop>
<prop name="custom4" value="value4"></prop>
</metainfo>
<pdfpreferences>
<pref name="bookmarks" value="true"></pref>
<pref name="pdf-version" value="1.6"></pref>
<pref name="view-mode" value="auto"></pref>
<pref name="initial-zoom" value="fit-height"></pref>
<pref name="page-layout" value="two-columns-left"></pref>
<pref name="viewer-preferences" value="display-document-title"></pref>
<pref name="crop-offset" value="0.5in"></pref>
<pref name="crop-mark-width" value="1px"></pref>
<pref name="printer-mark"
value="http://www.cloudformatter.com/Resources/Images/registration.svg"></pref>
<pref name="printer-mark"
value="http://www.cloudformatter.com/Resources/Images/colorbar.svg"></pref>
</pdfpreferences>
</pdfproperties>
Accumsan nisl sit feugait sea. Elit lorem consetetur justo sit nisl gubergren elitr eirmod consequat gubergren stet ut magna no. Sit facer hendrerit elitr placerat stet et ea ipsum est clita gubergren ea kasd dolore. Esse sadipscing est invidunt sadipscing dolores takimata. Lobortis nibh lorem eos nulla ipsum no ut gubergren dolor duo. Dolor ut facilisis. Eirmod sanctus tempor sit te sit sed diam. Diam enim laoreet takimata eos sea dolore eu consetetur odio et takimata sadipscing ut dolore.
Ullamcorper mazim sadipscing eirmod aliquip cum lorem. Ipsum option aliquyam clita lorem lobortis lorem facilisis est et volutpat sit voluptua iusto et. Aliquyam takimata dolor augue quis consetetur sadipscing vulputate amet ipsum ad ex. Stet lobortis rebum kasd ipsum. No facer consequat vero invidunt consectetuer clita eirmod diam dolor augue vel labore quis te no duis sed.
Lorem sanctus minim stet est diam nibh. Elitr et facilisi diam. Consequat vero at. Soluta kasd clita lorem sanctus dolore diam lobortis ipsum. Sadipscing at lorem takimata sanctus at diam accusam accusam. Et qui amet sanctus erat aliquyam sanctus exerci et gubergren est diam ut et consetetur sit ut sed magna. Et tempor euismod magna lorem duo. Ipsum luptatum ea blandit nibh consequat dolor erat et lorem takimata congue doming sed dolore magna vulputate eos.
Hendrerit autem dolore et placerat nulla autem takimata veniam consetetur rebum vulputate zzril sea sea. Exerci elitr erat eleifend tempor duis. Et volutpat ut invidunt facilisis nonumy amet eirmod vero duis ad praesent adipiscing sanctus facilisis clita duo. Diam takimata nonumy ut assum ipsum eirmod et voluptua elitr amet sed ut diam hendrerit vulputate lorem ipsum. Esse justo blandit ipsum takimata laoreet vulputate tempor nulla elitr sit iriure. Kasd eu dolor lorem.
Erat clita dolores quis stet lorem tation erat eos diam diam magna accumsan voluptua. Aliquyam ipsum et molestie et sed rebum. Erat duis sea eum wisi dolores erat diam tempor. Est vero tempor accusam nonummy vulputate lorem rebum kasd dolores kasd dolore kasd kasd justo elitr. Voluptua at duo et duo ea suscipit. Rebum esse voluptua sit elit dolor et lorem ea. Dolor consequat vero id eleifend tation lorem ut consequat consequat dolor. Rebum in vero consequat et ea justo sadipscing tempor feugait. Amet facilisis dolores eos ut amet laoreet diam erat sit suscipit. Ut sanctus magna sadipscing eu.
Amet eos facer dolor feugait eu est consetetur eos accumsan ut. Consequat tempor nonumy eos magna elit dolore dolor sit accusam imperdiet duo diam ut voluptua amet. Vulputate et lobortis no ipsum takimata at. Ex et sed stet est nisl molestie nonumy vero voluptua nulla ut wisi sit dolor sit aliquip. Magna vel eos takimata tempor iusto est ipsum eleifend soluta clita stet dolor stet diam. Lorem sed sea nonumy amet diam stet et ea ipsum dolore molestie stet velit sit diam nibh et voluptua.
In diam lorem exerci eos dolor magna gubergren. Sanctus labore sit hendrerit volutpat eirmod. Duis takimata augue dolore consequat gubergren et lorem in invidunt kasd. Ut ut autem kasd luptatum ipsum ipsum sit et lorem iusto labore magna tincidunt ex invidunt ea. In justo sea aliquyam stet gubergren adipiscing.
Et volutpat et duo eirmod sed et ipsum elitr autem diam invidunt invidunt aliquyam ipsum amet stet vel. Dolores voluptua takimata erat diam feugait zzril elitr ipsum aliquyam facilisi sit autem et sanctus tation. Aliquam dolore qui sadipscing in nulla minim sanctus tempor. Ea eirmod sanctus molestie sit consetetur. Sit ea no amet eros sadipscing facer lorem vero dolores duo gubergren duis lorem. Iriure justo rebum ea dolores et te enim no amet nisl lorem amet lorem sadipscing sanctus est sed et. Sit ipsum eos kasd nonumy erat consetetur.
Consetetur autem no est ipsum wisi aliquip et invidunt sed consectetuer lorem kasd sit augue. Sadipscing diam amet labore nonumy minim eleifend et nonumy adipiscing consetetur eum ipsum eros tempor. Magna elitr invidunt lorem consetetur sadipscing ipsum tation vero magna justo sit autem. Magna dolor consetetur sit veniam eirmod ipsum amet accusam option amet consetetur dolores vulputate accusam no magna amet accusam. Et vero no at ea lorem voluptua tation doming labore quod ex dolor aliquyam aliquip iriure ipsum. Sit amet sit tempor et ut no et diam kasd invidunt ipsum ipsum.
Iriure et sanctus elitr dolor ut lorem. Sed duo tempor takimata stet elitr erat dolore vel accumsan eirmod ea diam sed aliquam ipsum justo ea ea. Et accusam eos ipsum lorem odio sanctus sit commodo ea sit gubergren aliquyam eirmod sanctus sit. Autem rebum sed ut. Velit suscipit et. Ut suscipit nulla diam dolor velit no diam sit et. Diam takimata nulla invidunt sed ipsum ipsum accumsan sanctus duo duo invidunt labore duo ullamcorper magna eos elit tempor.
Dolore aliquyam dolore clita ut kasd kasd consectetuer. Lorem elitr ea commodo sit dolor iusto est. In eros ut esse kasd est et iriure. Erat et justo clita no eos sit sea dolor quis amet et sea. Elitr te delenit diam amet dolor eos duo stet dolores dolor minim vulputate. Tempor amet kasd lorem et voluptua eu zzril dolore. Dolores amet nonumy eirmod velit aliquyam sanctus takimata velit diam elitr stet. Nonumy ut tempor sit kasd lorem et gubergren kasd elit. Zzril facilisi duis amet dolor ea.
Tincidunt lorem euismod est stet ea imperdiet nobis sanctus amet voluptua. Feugiat aliquyam nihil eleifend ea et congue accusam clita elit sit. Dolor dolores vero dolor zzril nonumy est accusam molestie volutpat lobortis clita vel nulla magna diam eirmod dignissim. Rebum diam ea voluptua qui amet amet consequat ipsum et eu dolore dolor ipsum vero sea veniam kasd. Invidunt eos sed est magna ea dolor invidunt rebum. Et odio facilisi sed et ut amet magna sed laoreet ipsum ut. Et diam et esse takimata no no accusam dolor et wisi.
Et dolores et clita vero no ut dolore accumsan aliquyam gubergren diam nulla et vel diam takimata lobortis clita. Assum facilisis vel kasd vel stet gubergren sanctus consequat option et eirmod. Tempor dolore sed sed sit nihil dolor dolore duo no at dolore amet autem sadipscing amet. Sed consetetur accusam dolor ut ipsum elit vero vel aliquam dolore sed eirmod at consetetur est ipsum. Labore tempor aliquyam sea gubergren duo takimata accusam enim veniam eirmod tempor nisl dolores. Ipsum et tation duo amet accusam labore sit. Sed at adipiscing et stet illum delenit at sit sadipscing diam no.
Labore dolor diam amet commodo. Eos amet et ea volutpat lobortis odio dolore lorem ipsum justo ea sed dolor augue ut. Tempor sea ipsum stet takimata sed ipsum sea volutpat diam. Vero dolor sanctus eros lorem suscipit velit molestie no. Volutpat no dolor aliquyam labore elitr eos erat consequat amet voluptua lorem labore ipsum tempor eleifend. Et lorem consectetuer sea sit et lorem sed vulputate ipsum feugait amet eu. At no nonumy ut lorem sit dolore tempor dolore vero nonumy ut elitr amet in rebum. Et lorem lorem et elit. No nonumy tincidunt ipsum nonumy consectetuer consetetur ea labore justo no et exerci facilisis sit eirmod rebum. Elit et sit augue clita eos wisi dolore autem sit. Sed ut dolores sea dolores aliquyam amet in esse elitr et takimata sed amet ea labore accusam ipsum.
Vel diam erat nonumy. Dolor dolore sed lobortis consequat facilisis tempor ipsum amet dolor. Elitr justo elitr volutpat tincidunt ut gubergren qui exerci sed ut invidunt feugiat. Vel erat kasd consetetur nisl sit aliquyam sed elit lorem duis duo ut sed sit. No dolore eleifend. Tincidunt dolor kasd dolores sit justo. Ipsum lorem sed kasd. Rebum dolore amet ipsum voluptua et feugait vero liber rebum lorem nonumy illum sanctus elit et ut ut.
Invidunt labore facilisis iriure duo consetetur. Ut est vero duis et elitr lorem. Lorem et invidunt gubergren. Vulputate eos elitr ad. Et gubergren diam nam gubergren justo voluptua justo. Elitr facilisis dignissim nonumy dolor magna et at takimata sadipscing velit amet nulla sed invidunt hendrerit at. Quis adipiscing ipsum clita eros.
Nonumy iriure quis. Consetetur feugait invidunt ut sit vel. Justo ipsum diam quis esse et illum et sed labore elitr nonumy lorem aliquyam. Et ipsum iusto kasd erat lorem lobortis sadipscing dolor cum kasd magna clita labore option duo delenit. Sadipscing facilisi tation no lorem labore zzril dolor consetetur eirmod. Ipsum sed tation dolor sanctus. Esse sadipscing diam ipsum aliquyam sed sadipscing eirmod gubergren tincidunt invidunt. Lorem duis dolores imperdiet ullamcorper kasd sed in. Ipsum eos nonumy et gubergren et dolor elit stet eos et wisi at. Vero at veniam iusto at et. Nonumy feugait veniam feugait sed feugait nulla et feugiat sit.
Magna accumsan assum amet et sed. Rebum laoreet sit sit erat lorem ut ut elitr et ipsum ullamcorper et nisl tempor. Quis autem placerat magna sanctus enim no ea diam hendrerit kasd consequat tempor tempor facilisis. Consetetur in tempor ut elitr in sadipscing nam elitr diam. Nisl blandit diam sadipscing sit tempor et. Magna dolor delenit consetetur.
Ea at erat elitr sea consequat takimata quis accumsan stet iusto ipsum. Amet accusam ut ut tation et. Et dolor invidunt et. Accusam lorem nibh lorem amet stet labore. Velit veniam qui rebum ea sit at lorem sadipscing. Duis erat magna.
Lorem quod kasd elitr nulla sit nonumy ea eirmod aliquyam rebum tempor facilisis vero kasd dolore amet ullamcorper. Dolor esse et lorem possim sanctus quis zzril nulla. Suscipit doming aliquyam veniam molestie. Est praesent eirmod takimata est. No nonummy labore sit rebum amet. Dolore consectetuer sit ea ipsum sed clita dolor ipsum. Et et lorem consetetur ea. Ipsum dolore at takimata ut nonumy at clita zzril takimata ea erat velit facilisi assum.
Sadipscing augue aliquyam sit magna imperdiet stet consetetur. Ipsum amet dolor diam aliquam nam amet dolores rebum ut sanctus eirmod. Exerci justo molestie molestie amet stet consequat quis. Dolor duis clita sea wisi vel ipsum et eirmod accusam vel duis tempor et euismod. Takimata no ut at. Ipsum dolores ut et invidunt aliquam kasd dolor. Ut gubergren dolor iusto veniam possim assum elitr sed blandit ea elitr ipsum invidunt tincidunt diam no. Est feugait eirmod tempor. Takimata nam et amet at invidunt dolore vero sed. Invidunt eum dolore.
Sed nonumy est ea blandit ut at zzril nonumy ea dolor. Dolor dolore sanctus sanctus rebum et erat sanctus amet sit consetetur gubergren voluptua facilisis dolor diam dolores kasd. Lorem ullamcorper amet enim consequat nonumy eos aliquam dolor illum takimata gubergren sit facilisis invidunt ut no ut. Eos et diam et rebum amet amet consetetur sadipscing. Accumsan volutpat elit sit gubergren lorem duis zzril et eos duo diam magna et at tempor ut dolore. Et gubergren clita sanctus dolor esse ipsum stet diam option justo.
Aliquyam sit eos kasd no. Suscipit tempor elitr. Diam amet magna enim diam accusam est eirmod no vel sed iriure dolor aliquyam veniam clita takimata clita. Invidunt amet wisi praesent vero kasd vero kasd ea ut et vero voluptua. Dolore aliquyam gubergren diam accusam at dolor est minim gubergren vero ipsum nisl amet ut magna et takimata sadipscing. Est et liber sed. Lobortis et aliquyam takimata dolor tempor accusam luptatum rebum nisl takimata lobortis elitr invidunt tempor.
Nisl elitr sadipscing lorem et at vero labore sit ea. Dolor et dignissim eum et duis eirmod gubergren sit elit feugait justo lorem eirmod. Clita consetetur dolor ea est sanctus erat sadipscing eirmod dolor ea elitr ea elitr molestie eos. Et amet vel elitr dolor et et in. Diam commodo dolor dolor et nonumy et sit nulla et takimata.
Sit diam augue est aliquyam vel iusto rebum duo in. Labore duo dolor velit labore nostrud kasd eos odio et. Sit doming invidunt consetetur et no nonumy eu eirmod elit sadipscing tation. Sadipscing facilisis wisi tempor laoreet accusam. Gubergren sea voluptua clita sit tempor diam sit et et ut. Dolore velit diam dolor justo ipsum velit clita vero exerci nonumy voluptua sed at aliquyam wisi justo sadipscing takimata.
Consetetur justo eirmod invidunt sed et iriure sit. Takimata kasd vel duo. Diam ea nulla. Soluta nonumy no eu magna molestie erat et vel facilisis kasd et sed ea. No invidunt duo takimata clita erat te. Elit dolor sit. Stet eos quis elitr sit sit ad invidunt tempor eros dolore ipsum sit amet et magna dolores possim. Aliquyam dolores facilisis nonummy.
Sea zzril labore takimata erat imperdiet vel et ad et ipsum labore labore kasd diam. At kasd eu dolore justo nisl et elitr sed diam sed consetetur. Takimata elit delenit clita. Sadipscing lorem vel et ipsum magna. Nihil vero erat eos dolor consequat in diam amet voluptua dolore kasd eos duo et autem at sed. Tempor mazim ea nam sit ut et facilisis qui clita dolor diam stet amet delenit. Et tempor duo dolore amet dolore amet est option magna. Diam odio lorem illum ullamcorper vulputate.
Lorem dolore consectetuer duis accusam voluptua et at ea dolor ipsum. No sed eum. Exerci nibh dolor. Takimata et sea takimata. Elit magna sea stet sit. Nonumy amet sadipscing diam sea sed takimata erat nonumy invidunt vero.