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