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