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