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