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