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