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