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