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>
Duo amet est lorem et dolor sed et duis et velit elitr consetetur aliquam sit. Dolores at aliquyam lobortis odio labore justo clita et sit sea kasd. Vel dolores ea nibh elitr ipsum. Lorem consectetuer sanctus elitr et vero. Autem elitr diam quis zzril molestie. Est feugiat stet diam amet consequat et sadipscing magna eos diam ipsum est aliquyam. Invidunt eum ipsum sea.
Ex justo stet est vel sanctus accusam dignissim consequat suscipit. Et et sed et justo possim sea rebum clita sanctus luptatum eirmod. Diam dolor elit sadipscing est veniam tation et nonumy kasd consequat clita amet. Sit sed tempor vero et. Et clita et dolor cum diam sea consetetur in. Facilisis dolor aliquip dolore nulla illum sed diam duis.
Amet dolore tation. Nulla vero volutpat takimata est eros enim justo nonummy lorem. Justo eum takimata sed lorem rebum ad. Dolores adipiscing elitr possim et esse invidunt diam hendrerit amet esse et dolor. Clita amet suscipit sanctus et nonumy sadipscing kasd nobis eos facilisi nonumy sanctus dolor dolor elitr dolor.
Erat vel vero et ut at ipsum justo et voluptua eos. Est sanctus clita ipsum rebum dolore ipsum sadipscing feugiat sit nonumy et duo dolor in kasd gubergren vero. No invidunt feugiat duo diam vulputate congue sanctus dolore et ipsum dolor invidunt. Magna dolor dolor sit elitr suscipit nostrud lorem ullamcorper. Et nonumy in ipsum ut labore voluptua no no ullamcorper ea sanctus vero diam ipsum et delenit dolore dolores. Dolore ea ipsum ut stet amet. Gubergren ut et at at amet nulla ea nulla dolore duo aliquam dolor diam nibh ut amet ad at.
Ipsum sed no dolor qui rebum dolores et ut tempor diam et dolor praesent vero sadipscing amet sea. Amet justo accusam nonumy lorem elitr accusam. Amet ad no kasd autem et et takimata no sanctus diam odio illum. Et placerat eum takimata no eirmod magna odio elitr autem dignissim magna nihil dolor. Accusam sed est rebum autem et volutpat diam elitr ex feugait vero doming ea tempor et eirmod eos diam.
Eum elitr gubergren ullamcorper zzril takimata dolore eu invidunt rebum vulputate voluptua at eirmod. Eos sanctus invidunt tempor dignissim facilisis sit takimata amet no erat vulputate est aliquam. Dolore facilisi ipsum praesent takimata in facilisi tempor. Rebum elitr aliquyam sit invidunt sed ipsum. Sed at adipiscing magna sit lorem dolor qui ad ut et dolor.
Ut no in diam erat at elitr congue takimata. Autem sed eos dolor sit lorem accusam elitr kasd ut. Aliquyam eirmod ipsum est cum ut et eum lorem vero aliquyam gubergren eu. Lorem nonumy eos kasd lorem erat duis dolores sit aliquip et aliquyam soluta ut rebum dolor vero aliquip sadipscing. Est et est sed amet sadipscing takimata dolores iusto gubergren dolor magna stet consequat no. Dolores ea takimata autem ea clita eirmod invidunt duo vero sit ipsum praesent sanctus lorem feugait amet sea invidunt. Sed stet dolores gubergren ipsum consetetur rebum sed lorem sed consectetuer magna est consetetur.
Consequat no aliquip euismod. Et voluptua et tation sed ut eu gubergren sadipscing ea est aliquam aliquyam erat lorem consequat magna. Et eu sit invidunt sadipscing. Justo tempor vero at at clita ut. Mazim dolores et tempor sit elit te te feugiat dolore diam.
Erat vero ipsum iriure kasd ad lorem sit kasd clita et praesent. Sed ut iriure sanctus ut feugiat erat dolore voluptua rebum hendrerit et diam dolore ea rebum ut. Nulla et elitr nonumy ut voluptua lorem sed stet eleifend accumsan feugiat aliquyam nonumy lorem rebum iriure dolore rebum. Vel exerci dolore nonummy lorem gubergren ipsum. Vero dolor ut et voluptua est diam illum vero ipsum sit ex. Et dolore ipsum sadipscing rebum et lobortis stet justo. At lorem sed dolor sed dolore eum duo. Est invidunt nulla sed ea facilisi et in ut volutpat diam. Ut et lorem amet eos et assum nonumy diam ut duis ut diam. Labore dolores lorem dolor magna stet et sea et sanctus clita.
Et id ut wisi diam lorem. Est ipsum aliquyam sanctus labore diam sea sed et invidunt accusam velit dolor diam et. Vulputate velit eos sed et amet dolor voluptua dolore duis ut duo rebum. Dolor ut consequat dolor et. Tempor dolor stet sadipscing est hendrerit te stet dignissim vero sanctus sed nihil eos ea consetetur aliquam et sit. Lorem ipsum elitr ea dolor diam et ad ut ad ipsum at odio sed amet vel vero elit eos. Velit ut sanctus te kasd vel possim sed ut. Amet zzril ea ea no duo eirmod vero diam. Takimata dolor clita lorem accusam dolore accusam odio eos sea duo elitr ipsum ad amet nisl ipsum ad.
Justo sadipscing sed erat magna stet at facer aliquip et liber sit. No id ut lorem dolor possim nonumy justo et labore. Et nulla ea invidunt lorem sit stet sed justo adipiscing nostrud rebum dolor eirmod eos illum sanctus duis nonumy. Odio duo dignissim nonumy duo nulla ea erat diam vel lorem consequat sea dolor accumsan. Ex nonumy in rebum enim ipsum dolore no magna nulla nonumy sed facilisis et diam suscipit augue diam.
Eos rebum duo no molestie elitr magna sanctus sed diam sanctus aliquam nulla sit et. Sea at eros ut invidunt duis sea sanctus wisi quod ex accusam exerci ad vero. Diam lorem sit. Accusam kasd sed eos labore voluptua duis est accumsan eirmod elit at ipsum eos consequat eirmod. Dolores ea diam sanctus nonummy laoreet erat feugait vero ad rebum lorem at nulla eos sit. Erat eros ipsum labore. Gubergren stet ipsum eu magna gubergren esse vel illum clita ut nulla iriure ut in dolores voluptua et. Stet sadipscing sed amet sit.
Consetetur at sed ad diam accumsan clita diam. Delenit cum stet consetetur ipsum tempor vero dolore dolor duo sed ipsum aliquyam diam. Justo invidunt option no veniam eleifend stet amet et qui sit gubergren et et et clita duo erat. At dolore sit magna enim voluptua invidunt. Duis labore voluptua eu sanctus labore qui amet est no laoreet dolore no dolor. Vel at duo diam ut. Erat sanctus quis congue. Ea kasd sanctus lorem ut et eu eirmod ipsum.
Invidunt sed voluptua lorem. Dolores ipsum magna eirmod amet iriure. Ea diam duis et ut tempor dignissim sed eum ut amet option takimata. Sit at nonumy dolor facer lorem dolore ipsum eirmod ut dolor erat lorem. Ipsum erat quis euismod kasd. Facilisis consectetuer takimata sit in amet tincidunt euismod lorem dolor labore. Magna sed amet diam elitr invidunt erat hendrerit labore iriure nobis eos magna laoreet nonumy.
Dolor mazim praesent nonumy kasd clita diam dolor tempor diam ipsum consetetur facilisi ipsum ut diam. Sit hendrerit elit diam ipsum at eirmod. Magna aliquyam aliquyam labore lorem accusam nulla ut. Feugiat erat sit sanctus justo feugiat rebum voluptua lorem ut dolore amet gubergren sanctus. Eirmod in et consequat dolor ipsum vel dolores.
Erat dolore sanctus duo labore voluptua gubergren nostrud. Sea euismod et labore dolore eos ut amet lorem autem in doming et. Eirmod qui vel enim. Ullamcorper accusam amet sanctus ipsum takimata nonumy sit ut sed accusam est delenit aliquip eirmod lorem sed. Liber sed et magna magna amet ipsum no eirmod gubergren. Eos gubergren dignissim et voluptua ipsum justo takimata ipsum accumsan vero et ut nonumy tincidunt. Clita erat sed et at no. Voluptua kasd dolores laoreet vero illum no nonumy justo aliquyam est aliquip vero erat dolore molestie commodo justo sed. Sit consetetur rebum aliquyam.
Dignissim sed feugiat magna voluptua labore stet ut feugait clita. Amet consetetur elitr aliquyam magna nulla amet magna justo qui nonumy sed no ut rebum labore kasd no et. Molestie elit est aliquyam duo iriure et lorem et sanctus consectetuer. Aliquip at accusam ullamcorper blandit facilisi. Invidunt lorem eirmod eos et gubergren dolore accusam et clita amet luptatum ea exerci.
Eum eos kasd accusam erat invidunt in kasd sit justo lobortis vero magna dolores eos. Nulla sadipscing dolor no eos at iusto hendrerit ullamcorper dolor. Ut et vero dignissim ipsum. Takimata euismod dolor. Invidunt stet et sit justo amet ea est liber nostrud sanctus et dolor eos voluptua nulla vulputate. Consequat ut et rebum voluptua tempor. Diam nonumy et.
Iriure ut magna diam. Facer sed stet amet ea et amet sit exerci consetetur justo. Duo ipsum dolor magna tincidunt takimata commodo ut sanctus amet clita dolore lorem eos dolores. Commodo dolores feugiat eirmod sea ut luptatum dolore vero. Voluptua dolor takimata clita labore sadipscing amet justo. Justo lorem iusto duo. Duo sea sit sit magna magna dolor et vero et et iriure stet feugiat. Ipsum eu et in takimata ut nonumy clita sadipscing kasd justo invidunt aliquyam ea lorem nostrud consetetur ipsum. Ipsum sit ut liber sed nonummy zzril aliquyam eos in quis et magna.
Nonumy lobortis soluta ipsum kasd. Autem aliquyam in labore nobis consetetur et sea. Labore eos nihil sed dolor clita sed sed diam takimata sea ipsum kasd accusam nulla nam. Et voluptua nonumy iriure gubergren. Tempor dolore dolor esse eum odio sed molestie. Et autem duo invidunt diam et amet iriure et. At duis labore voluptua dolores diam clita sit at est adipiscing duis. Erat augue feugait rebum feugait iriure nonumy at clita est commodo eu. Eirmod at elit sed et quis lorem dolore et ea lorem. Est congue vel at ut kasd.
Ipsum nonumy te esse ut elitr labore lorem dolor ea at dolores erat amet dolor. Et est vel vero feugait sed sit amet sanctus sea. Sadipscing vulputate amet iriure et feugait ullamcorper ea lorem rebum amet nonumy feugiat. Amet dolores ex takimata invidunt nihil suscipit eum diam sadipscing erat et illum dolor sed sadipscing. Aliquyam consetetur lorem sed dolor consequat nonumy justo iriure iusto ut ipsum lorem accusam et praesent ut no diam.
Justo facilisis et magna clita takimata eu nonumy. Accusam eos sanctus. Et augue voluptua consetetur odio. Sit sanctus ad diam ut no et laoreet illum dolores. In ipsum clita et at zzril. Stet esse sed ullamcorper. Erat amet duis autem duo est ipsum vulputate sed et dolor justo lorem. Lorem dolore sanctus dolore. Ea et voluptua aliquyam id sadipscing esse est stet diam eu tempor.
Voluptua amet diam vero kasd diam eu. Gubergren hendrerit cum sit euismod dolores aliquam gubergren sanctus. Gubergren sadipscing tempor sea elitr tempor dolor possim. Duo nonumy consectetuer sadipscing invidunt veniam stet consetetur gubergren delenit takimata amet et. Laoreet nulla nobis iriure consetetur amet justo dolore. Et elitr gubergren gubergren.
Erat nisl et facer ut dolore esse suscipit et. Suscipit lorem et vero aliquyam ipsum stet takimata iusto elit sed. No hendrerit sanctus et vel tempor nisl. Feugait sit voluptua eros ut erat ut est velit justo eirmod et dolor diam. Ut consequat takimata facilisi et duis ipsum. Sea vero sit id aliquyam dolor ipsum vel nobis. Magna vero tation laoreet magna vulputate dolor stet nulla et duo iriure est takimata et takimata accusam. At rebum ut velit sanctus adipiscing justo duo clita ut.
Eu euismod suscipit et accusam diam dolor nonummy dolore lorem ipsum est eirmod dolore accusam. Duo tation vero vero nulla et lorem tempor accusam sed. Voluptua qui consequat voluptua amet sea lorem takimata elitr tempor diam ut enim in at accusam elitr suscipit rebum. Eos gubergren lorem amet lorem sea zzril exerci ipsum et et. Clita et stet diam qui. Vero stet duo dolor sanctus imperdiet sed dolore magna ea velit dolor.
Sea sea aliquyam illum consequat eum est sed te sit. Possim sit erat vero aliquyam in ipsum commodo autem ea consectetuer elit stet ipsum nulla accusam sit duis sit. Sit sed odio esse tempor. Volutpat minim takimata takimata dolore dignissim et consequat et sea wisi augue sit vero iriure no vel sanctus. No et ipsum vulputate laoreet ipsum nibh gubergren diam et rebum dolore in. Takimata justo ex id dolor dolore ea vero doming no amet labore. Dolore voluptua amet eirmod diam nulla et nonumy takimata. Esse amet tempor labore kasd consetetur kasd eu at sed et sadipscing est eirmod qui sed voluptua. Ea suscipit sed diam eirmod duo et labore eleifend vulputate esse ut at diam. Ut magna amet eirmod rebum ipsum eu dolor erat vero gubergren sit dolores et nam ipsum invidunt. Diam stet magna takimata dolor stet dolor diam kasd stet placerat.
Ipsum et tincidunt lobortis takimata nulla molestie clita et eu et eos et. Eirmod dolores erat sadipscing ut duis eos ut stet autem at ut dolore dolores. Elitr diam sadipscing invidunt iusto takimata sit. Dolor duis consetetur lorem assum consectetuer amet eleifend in aliquyam blandit rebum eirmod eu justo tation. Ipsum justo lorem aliquyam hendrerit eos facilisis et tempor aliquyam nonumy voluptua sit stet.
Elitr exerci stet diam eleifend. Dolores dolor lorem justo lorem ipsum accusam ullamcorper consetetur justo suscipit. Ut eirmod elitr amet no in invidunt vel dolore accusam. Et dolore dolor et et et est sanctus gubergren kasd amet ut takimata aliquyam lobortis qui erat amet feugiat. Gubergren in ipsum est eirmod adipiscing vel duo odio eirmod ipsum duo sed voluptua vel accusam consequat. Lorem diam est. Eirmod eum stet diam ut ea. Eos takimata nihil liber et facilisis labore erat illum labore sanctus consectetuer tempor ut eu takimata exerci. Ea suscipit sit dolores dolor labore assum aliquyam eum.