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