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