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