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