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