Chapter 11
Document Information and Metadata

cpdf -info [-raw | -utf8] in.pdf

cpdf -page-info in.pdf

cpdf -pages in.pdf

cpdf -set-title <title of document>
     [-also-set-xmp] [-just-set-xmp] [-raw] in.pdf -o out.pdf
(Also -set-author etc. See Section 11.2.)

cpdf -set-page-layout <layout> in.pdf -o out.pdf

cpdf -set-page-mode <mode> in.pdf -o out.pdf

cpdf -hide-toolbar <true | false> in.pdf -o out.pdf
     -hide-menubar
     -hide-window-ui
     -fit-window
     -center-window
     -display-doc-title

cpdf -open-at-page <page number> in.pdf -o out.pdf
cpdf -open-at-page-fit <page number> in.pdf -o out.pdf

cpdf -set-metadata <metadata-file> in.pdf -o out.pdfcpdf -remove-metadata in.pdf -o out.pdf
cpdf -print-metadata in.pdf
cpdf -create-metadata in.pdf -o out.pdf
cpdf -set-metadata-date <date> in.pdf -o out.pdf

cpdf -add-page-labels in.pdf -o out.pdf
     [-label-style <style>] [-label-prefix <string>]
     [-label-startval <integer>] [-labels-progress]

cpdf -remove-page-labels in.pdf -o out.pdf
cpdf -print-page-labels in.pdf

11.1 Reading Document Information

The -info operation prints entries from the document information dictionary, and from any XMP metadata to standard output.

$cpdf -info pdf_reference.pdf
Encryption: 40bit
Linearized: true
Permissions: No edit
Version: 1.6
Pages: 1310
Title: PDF Reference, version 1.7
Author: Adobe Systems Incorporated
Subject: Adobe Portable Document Format (PDF)
Keywords:
Creator: FrameMaker 7.2
Producer: Acrobat Distiller 7.0.5 (Windows)
Created: D:20061017081020Z
Modified: D:20061118211043-0230
XMP pdf:Producer: Adobe PDF library 7.77
XMP xmp:CreateDate: 2006-12-21T18:19:09+01:00
XMP xmp:CreatorTool: Adobe Illustrator CS2
XMP xmp:MetadataDate: 2006-12-21T18:19:09Z
XMP xmp:ModifyDate: 2006-12-21T18:19:09Z
XMP dc:title: AI6

The details of the format for creation and modification dates can be found in Appendix A.

By default, cpdf strips to ASCII, discarding character codes in excess of 127. In order to preserve the original unicode, add the -utf8 option. To disable all postprocessing of the string, add -raw. See Section 1.17 for more information.

The -page-info operation prints the page label, media box and other boxes page-by-page to standard output, for all pages in the current range.

$cpdf -page-info 14psfonts.pdf
Page 1:
Label: i
MediaBox: 0.000000 0.000000 600.000000 450.000000
CropBox: 200.000000 200.000000 500.000000 500.000000
BleedBox:
TrimBox:
ArtBox:
Rotation: 0

Note that the format for boxes is minimum x, minimum y, maximum x, maximum y.

The -pages operation prints the number of pages in the file.

cpdf -pages Archos.pdf
8

11.2 Setting Document Information

The document information dictionary in a PDF file specifies various pieces of information about a PDF. These can be consulted in a PDF viewer (for instance, Acrobat).

Here is a summary of the commands for setting entries in the document information dictionary:

Information        Examplecomm and-lin efragment
Title              cpdf -set-title

(The details of the format for creation and modification dates can be found in Appendix A. Using the date "now" uses the time and date at which the command is executed. Note also that -producer and -creator may be used to set the producer and/or the creator when writing any file, separate from the operations described in this chapter.)

For example, to set the title, the full command line would be

cpdf -set-title "A Night in London" in.pdf -o out.pdf

The text string is considered to be in UTF8 format, unless the -raw option is added—in which case, it is unprocessed, save for the replacement of any octal escape sequence such as \017, which is replaced by a character of its value (here, 15).

To set also any field in the XMP metadata, add -also-set-xmp. The field must exist already. To set only the field (not the document information dictionary), add -just-set-xmp instead.

11.3 XMP Metadata

PDF files can contain a piece of arbitrary metadata, often in XMP format. This is typically stored in an uncompressed stream, so that other applications can read it without having to decode the whole PDF. To set the metadata:

cpdf -set-metadata data.xml in.pdf -o out.pdf

To remove any metadata:

cpdf -remove-metadata in.pdf -o out.pdf

To print the current metadata to standard output:

cpdf -print-metadata in.pdf

To create XMP metadata from scratch, using any information in the Document Information Dictionary (old-style metadata):

cpdf -create-metadata in.pdf -o out.pdf

To set the XMP metadata date field, use:

cpdf -set-metadata-date <date> in.pdf -o out.pdf

The date format is defined in Appendix A.2. Using the date "now" uses the time and date at which the command is executed.

11.4 Upon Opening a Document

11.4.1 Page Layout

The -set-page-layout operation specifies the page layout to be used when a document is opened in, for instance, Acrobat. The possible (case-sensitive) values are:

SinglePage      D isplay onepageatatim e
OneColumn       D isplay thep agesinonecolumn

TwoColumnLeft   Donispthlaeylethf pages in tw o colum ns, odd num bered pages

TwoColumnRight  Donispthlaeylethn pagesintwo columns,evennum beredpages
                (PDF 1.5and above)Displaythepagestwoatatime,odd
TwoPageLeft     num bered pageson the left

TwoPageRight    (PDF 1.5andabove)Displaythepagestw oatatime,even
                num bered pageson the left

For instance:

cpdf -set-page-layout TwoColumnRight in.pdf -o out.pdf

NB: If the file has a valid /OpenAction setting, which tells the PDF reader to open at a certain page or position on a page, this will override the page layout option. To prevent this, use the -remove-dict-entry functionality from Section 18.9:

cpdf -remove-dict-entry /OpenAction in.pdf -o out.pdf

11.4.2 Page Mode

The page mode in a PDF file defines how a viewer should display the document when first opened. The possible (case-sensitive) values are:

UseNone         N either docum entoutlinenor thum bnailim ages visible

UseOutlines     D ocum entoutline (bookmarks)visible
UseThumbs       Thum bnailimagesvisible
                Full-screenm ode(no menubar,windowcontrols,orany-
FullScreen      thing butthe docum entvisible)

UseOC           (PDF 1.5andabove)Optionalcontentgrouppanelvisible
UseAttachments  (PDF 1.5and above)Attachm entspanelvisible

For instance:

cpdf -set-page-mode FullScreen in.pdf -o out.pdf

11.4.3 Display Options

-hide-toolbar
                    H ide the viewer’stoolbar
-hide-menubar       D ocumentoutline (bookmarks)visible
-hide-window-ui     H ide the viewer’sscrollbars

-fit-window         R esizethe docum ent’swindowstofitsize offirstpage
-center-window      P ositionthedocumentwindow in thecenterofthescreen
                    D isplay the docum enttitleinsteadofthefilenameinthe
-display-doc-title  titlebar

For instance:

cpdf -hide-toolbar true in.pdf -o out.pdf

The page a PDF file opens at can be set using -open-at-page:

cpdf -open-at-page 15 in.pdf -o out.pdf

To have that page scaled to fit the window in the viewer, use -open-at-page-fit instead:

cpdf -open-at-page-fit end in.pdf -o out.pdf

(Here, we used end to open at the last page. Any page specification describing a single page is ok here.)

11.5 Page Labels

It is possible to add page labels to a document. These are not the printed on the page, but may be displayed alongside thumbnails or in print dialogue boxes by PDF readers. We use -add-page-labels to do this, by default with decimal arabic numbers (1,2,3…). We can add -label-style to choose what type of labels to add from these kinds:

    DecimalArabic  1,2,3,4,5...
   LowercaseRoman  i,ii,iii,iv,v...
   UppercaseRoman  I,II,III,IV,V...
 LUopwpeerrccaasseeLLeetttteerrss  aA,b,,Bc,,C..,...,.z,,aZa,,AbAb,..B.B...
NoLabelPrefixOnly  N onum ber,butaprefixwillbe used ifdefined.

We can use -label-prefix to add a textual prefix to each label. Consider a file with twenty pages and no current page labels (a PDF reader will assume 1,2,3…if there are none). We will add the following page labels:

i, ii, iii, iv, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, A-0, A-1, A-2, A-3, A-4, A-5

Here are the commands, in order:

cpdf -add-page-labels in.pdf 1-4 -label-style LowercaseRoman
     -o out.pdf

cpdf -add-page-labels out.pdf 5-14 -o out.pdf

cpdf -add-page-labels out.pdf 15-20 -label-prefix "A-"
     -label-startval 0 -o out.pdf

By default the labels begin at page number 1 for each range. To override this, we can use -label-startval (we used 0 in the final command), where we want the numbers to begin at zero rather than one. The option -labels-progress can be added to make sure the start value progresses between sub-ranges when the page range specified is disjoint, e.g 1-9, 30-40 or odd.

Page labels may be removed altogether by using -remove-page-labels command. To print the page labels from an existing file, use -print-page-labels. For example:

$ cpdf -print-page-labels cpdfmanual.pdf
labelstyle: LowercaseRoman
labelprefix: None
startpage: 1
startvalue: 1
labelstyle: DecimalArabic
labelprefix: None
startpage: 9
startvalue: 1

JavaScript Interface

 
// CHAPTER 11. Document Information and Metadata 
 
/** Finds out if a document is linearized as quickly as possible without 
loading it. 
@arg {string} filename file name 
@result {boolean} true if linearized */ 
function isLinearized(filename) {} 
 
/** Finds out if a document in memory is linearized as quickly as possible without 
loading it. 
@arg {Uint8Array} PDF file as a byte array 
@result {boolean} true if linearized */ 
function isLinearizedMemory(data) {} 
 
/** Returns the minor version number of a document. 
@arg {pdf} pdf PDF document 
@return {number} version number */ 
function getVersion(pdf) {} 
 
/** Returns the major version number of a document. 
@arg {pdf} pdf PDF document 
@return {number} major version number */ 
function getMajorVersion(pdf) {} 
 
/** Returns the title of a document. 
@arg {pdf} pdf PDF document 
@return {string} title */ 
function getTitle(pdf) {} 
 
/** Returns the author of a document. 
@arg {pdf} pdf PDF document 
@return {string} author */ 
function getAuthor(pdf) {} 
 
/** Returns the subject of a document. 
@arg {pdf} pdf PDF document 
@return {string} subject */ 
function getSubject(pdf) {} 
 
/** Returns the keywords of a document. 
@arg {pdf} pdf PDF document 
@return {string} keywords */ 
function getKeywords(pdf) {} 
 
/** Returns the creator of a document. 
@arg {pdf} pdf PDF document 
@return {string} creator */ 
function getCreator(pdf) {} 
 
/** Returns the producer of a document. 
@arg {pdf} pdf PDF document 
@return {string} producer */ 
function getProducer(pdf) {} 
 
/** Returns the creation date of a document. 
@arg {pdf} pdf PDF document 
@return {string} creation date */ 
function getCreationDate(pdf) {} 
 
/** Returns the modification date of a document. 
@arg {pdf} pdf PDF document 
@return {string} modification date */ 
function getModificationDate(pdf) {} 
 
/** Returns the XMP title of a document. 
@arg {pdf} pdf PDF document 
@return {string} XMP title */ 
function getTitleXMP(pdf) {} 
 
/** Returns the XMP author of a document. 
@arg {pdf} pdf PDF document 
@return {string} XMP author */ 
function getAuthorXMP(pdf) {} 
 
/** Returns the XMP subject of a document. 
@arg {pdf} pdf PDF document 
@return {string} XMP subject */ 
function getSubjectXMP(pdf) {} 
 
/** Returns the XMP keywords of a document. 
@arg {pdf} pdf PDF document 
@return {string} XMP keywords */ 
function getKeywordsXMP(pdf) {} 
 
/** Returns the XMP creator of a document. 
@arg {pdf} pdf PDF document 
@return {string} XMP creator */ 
function getCreatorXMP(pdf) {} 
 
/** Returns the XMP producer of a document. 
@arg {pdf} pdf PDF document 
@return {string} XMP producer */ 
function getProducerXMP(pdf) {} 
 
/** Returns the XMP creation date of a document. 
@arg {pdf} pdf PDF document 
@return {string} XMP creation date */ 
function getCreationDateXMP(pdf) {} 
 
/** Returns the XMP modification date of a document. 
@arg {pdf} pdf PDF document 
@return {string} XMP modification date */ 
function getModificationDateXMP(pdf) {} 
 
/** Sets the title of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s title */ 
function setTitle(pdf, s) {} 
 
/** Sets the author of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s author */ 
function setAuthor(pdf, s) {} 
 
/** Sets the subject of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s subject */ 
function setSubject(pdf, s) {} 
 
/** Sets the keywords of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s keywords */ 
function setKeywords(pdf, s) {} 
 
/** Sets the creator of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s creator */ 
function setCreator(pdf, s) {} 
 
/** Sets the producer of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s producer */ 
function setProducer(pdf, s) {} 
 
/** Sets the creation date of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s creation date */ 
function setCreationDate(pdf, s) {} 
 
/** Sets the modification date of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s modification date */ 
function setModificationDate(pdf, s) {} 
 
/** Sets the XMP title of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s XMP title */ 
function setTitleXMP(pdf, s) {} 
 
/** Sets the XMP author of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s XMP author */ 
function setAuthorXMP(pdf, s) {} 
 
/** Sets the XMP author of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s XMP subject */ 
function setSubjectXMP(pdf, s) {} 
 
/** Sets the XMP keywords of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s XMP keywords */ 
function setKeywordsXMP(pdf, s) {} 
 
/** Sets the XMP creator of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s XMP creator */ 
function setCreatorXMP(pdf, s) {} 
 
/** Sets the XMP producer of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s XMP producer */ 
function setProducerXMP(pdf, s) {} 
 
/** Sets the XMP creation date of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s XMP creation date */ 
function setCreationDateXMP(pdf, s) {} 
 
/** Sets the XMP modification date of a document. 
@arg {pdf} pdf PDF document 
@arg {string} s XMP modification date */ 
function setModificationDateXMP(pdf, s) {} 
 
/** Returns the components from a PDF date string. 
@arg {string} string date string 
@return {"array of numbers"} date components */ 
function getDateComponents(string) {} 
 
/** Builds a PDF date string from individual components. 
@arg {number} y year 
@arg {number} m month 
@arg {number} d day 
@arg {number} h hour 
@arg {number} min minute 
@arg {number} sec second 
@arg {number} hour_offset hour offset 
@arg {number} minute_offset minute offset 
@return {string} date string */ 
function dateStringOfComponents(y, m, d, h, min, sec, hour_offset, minute_offset) {} 
 
/** Gets the viewing rotation for a given page. 
@arg {pdf} pdf PDF document 
@arg {number} page page number 
@result {number} page rotation */ 
function getPageRotation(pdf, page) {} 
 
/** Returns true if that page has the given box. E.g "/CropBox". 
@arg {pdf} pdf PDF document 
@arg {number} page page number 
@arg {string} box box name 
@result {boolean} true if box present */ 
function hasBox(pdf, page, box) {} 
 
/** These functions get a box given the document, page number, min x, max x, 
min y, max y in points. Only succeeds if such a box exists, as checked by 
hasBox. 
@arg {pdf} pdf PDF document 
@arg {number} pagenumber page number 
@return {"array of numbers"} media box */ 
function getMediaBox(pdf, pagenumber) {} 
 
/** These functions get a box given the document, page number, min x, max x, 
min y, max y in points. Only succeeds if such a box exists, as checked by 
hasBox. 
@arg {pdf} pdf PDF document 
@arg {number} pagenumber page number 
@return {"array of numbers"} crop box */ 
function getCropBox(pdf, pagenumber) {} 
 
/** These functions get a box given the document, page number, min x, max x, 
min y, max y in points. Only succeeds if such a box exists, as checked by 
hasBox. 
@arg {pdf} pdf PDF document 
@arg {number} pagenumber page number 
@return {"array of numbers"} art box */ 
function getArtBox(pdf, pagenumber) {} 
 
/** These functions get a box given the document, page number, min x, max x, 
min y, max y in points. Only succeeds if such a box exists, as checked by 
hasBox. 
@arg {pdf} pdf PDF document 
@arg {number} pagenumber page number 
@return {"array of numbers"} bleed box */ 
function getBleedBox(pdf, pagenumber) {} 
 
/** These functions get a box given the document, page number, min x, max x, 
min y, max y in points. Only succeeds if such a box exists, as checked by 
hasBox. 
@arg {pdf} pdf PDF document 
@arg {number} pagenumber page number 
@return {"array of numbers"} trim box */ 
function getTrimBox(pdf, pagenumber) {} 
 
/** These functions set a box given the document, page range, min x, max x, 
min y, max y in points. 
@arg {pdf} pdf PDF document 
@arg {range} range page range 
@arg {number} minx min x 
@arg {number} maxx max x 
@arg {number} minx min y 
@arg {number} maxx max y */ 
function setMediabox(pdf, range, minx, maxx, miny, maxy) {} 
 
/** These functions set a box given the document, page range, min x, max x, 
min y, max y in points. 
@arg {pdf} pdf PDF document 
@arg {range} range page range 
@arg {number} minx min x 
@arg {number} maxx max x 
@arg {number} minx min y 
@arg {number} maxx max y */ 
function setCropBox(pdf, range, minx, maxx, miny, maxy) {} 
 
/** These functions set a box given the document, page range, min x, max x, 
min y, max y in points. 
@arg {pdf} pdf PDF document 
@arg {range} range page range 
@arg {number} minx min x 
@arg {number} maxx max x 
@arg {number} minx min y 
@arg {number} maxx max y */ 
function setTrimBox(pdf, range, minx, maxx, miny, maxy) {} 
 
/** These functions set a box given the document, page range, min x, max x, 
min y, max y in points. 
@arg {pdf} pdf PDF document 
@arg {range} range page range 
@arg {number} minx min x 
@arg {number} maxx max x 
@arg {number} minx min y 
@arg {number} maxx max y */ 
function setBleedBox(pdf, range, minx, maxx, miny, maxy) {} 
 
/** These functions set a box given the document, page range, min x, max x, 
min y, max y in points. 
@arg {pdf} pdf PDF document 
@arg {range} range page range 
@arg {number} minx min x 
@arg {number} maxx max x 
@arg {number} minx min y 
@arg {number} maxx max y */ 
function setArtBox(pdf, range, minx, maxx, miny, maxy) {} 
 
/** Marks a document as trapped. 
@arg {pdf} pdf PDF document */ 
function markTrapped(pdf) {} 
 
/** Marks a document as untrapped. 
@arg {pdf} pdf PDF document */ 
function markUntrapped(pdf) {} 
 
/** Marks a document as trapped in XMP metadata. 
@arg {pdf} pdf PDF document */ 
function markTrappedXMP(pdf) {} 
 
/** Marks a document as untrapped in XMP metadata. 
@arg {pdf} pdf PDF document */ 
function markUntrappedXMP(pdf) {} 
 
/** Single page */ 
var singlePage = 0; 
 
/** One column */ 
var oneColumn = 1; 
 
/** Two column left */ 
var twoColumnLeft = 2; 
 
/** Two column right */ 
var twoColumnRight = 3; 
 
/** Two page left */ 
var twoPageLeft = 4; 
 
/** Two page right */ 
var twoPageRight = 5; 
 
/** Sets the page layout for a document. 
@arg {pdf} pdf PDF document 
@arg {layout} layout page layout */ 
function setPageLayout(pdf, layout) {} 
 
/** Use none */ 
var useNone = 0; 
 
/** Use outlines */ 
var useOutlines = 1; 
 
/** Use thumbs */ 
var useThumbs = 2; 
 
/** Use OC */ 
var useOC = 3; 
 
/** Use attachments */ 
var useAttachments = 4; 
 
/** Sets the page mode for a document. 
@arg {pdf} pdf PDF document 
@arg {mode} mode page mode */ 
function setPageMode(pdf, mode) {} 
 
/** Sets the hide toolbar flag. 
@arg {pdf} pdf PDF document 
@arg {boolean} flag hide toolbar */ 
function hideToolbar(pdf, flag) {} 
 
/** Sets the hide menubar flag. 
@arg {pdf} pdf PDF document 
@arg {boolean} flag hide menubar */ 
function hideMenubar(pdf, flag) {} 
 
/** Sets the hide window UI flag. 
@arg {pdf} pdf PDF document 
@arg {boolean} flag hide UI */ 
function hideWindowUi(pdf, flag) {} 
 
/** Sets the fit window flag. 
@arg {pdf} pdf PDF document 
@arg {boolean} flag fit window */ 
function fitWindow(pdf, flag) {} 
 
/** Sets the center window flag. 
@arg {pdf} pdf PDF document 
@arg {boolean} flag center window */ 
function centerWindow(pdf, flag) {} 
 
/** Sets the display doc title flag. 
@arg {pdf} pdf PDF document 
@arg {boolean} flag display doc title */ 
function displayDocTitle(pdf, flag) {} 
 
/** Sets the PDF to open, possibly with zoom-to-fit, at the given page 
number. 
@arg {pdf} pdf PDF document 
@arg {boolean} fit zoom-to-fit 
@arg {number} pagenumber page number */ 
function openAtPage(pdf, fit, pagenumber) {} 
 
/** Sets the XMP metadata of a document, given a file name. 
@arg {pdf} pdf PDF document 
@arg {string} filename file name */ 
function setMetadataFromFile(pdf, filename) {} 
 
/** Sets the XMP metadata from an array of bytes. 
@arg {pdf} pdf PDF document 
@arg {Uint8Array} data XMP metadata as an array of bytes */ 
function setMetadataFromByteArray(pdf, data) {} 
 
/** Removes the XMP metadata from a document. 
@arg {pdf} pdf PDF document */ 
function removeMetadata(pdf) {} 
 
/** Returns the XMP metadata from a document. 
@arg {pdf} pdf PDF document 
@result {Uint8Array} XMP metadata as a byte array */ 
function getMetadata(pdf) {} 
 
/** Builds fresh XMP metadata as best it can from existing metadata in the 
document. 
@arg {pdf} pdf PDF document */ 
function createMetadata(pdf) {} 
 
/** Sets the metadata date for a PDF. The date is given in PDF date format -- 
cpdf will convert it to XMP format. The date now means now. */ 
function setMetadataDate(pdf, date) {} 
 
/** 1, 2, 3... */ 
var decimalArabic = 0; 
 
/** I, II, III... */ 
var uppercaseRoman = 1; 
 
/** i, ii, iii... */ 
var lowercaseRoman = 2; 
 
/** A, B, C... */ 
var uppercaseLetters = 3; 
 
/** a, b, c... */ 
var lowercaseLetters = 4; 
 
/** Adds page labels. The prefix is prefix text for each label. The range is 
the page range the labels apply to. Offset can be used to shift the numbering 
up or down. 
@arg {pdf} pdf PDF document 
@arg {style} style page label style 
@arg {string} prefix label prefix 
@arg {number} offset offset 
@arg {range} range page range 
@arg {boolean} progress labels progress */ 
function addPageLabels(pdf, style, prefix, offset, range, progress) {} 
 
/** Removes the page labels from the document. 
@arg {pdf} pdf PDF document */ 
function removePageLabels(pdf) {} 
 
/** Calculates the full label string for a given page, and returns it. 
@arg {pdf} pdf PDF document 
@arg {number} pagenumber page number 
@result {string} page label string */ 
function getPageLabelStringForPage(pdf, pagenumber) {} 
 
/** Gets page label data. Call startGetPageLabels to find out how many 
there are, then use these serial numbers to get the style, prefix, offset 
and start value (note not a range). Call endGetPageLabels to clean up.<br/><br/> 
 
For example, a document might have five pages of introduction with roman 
numerals, followed by the rest of the pages in decimal arabic, numbered from 
one:<br/><br/> 
 
labelstyle = LowercaseRoman<br/> 
labelprefix = ""<br/> 
startpage = 1<br/> 
startvalue = 1<br/></br> 
 
labelstyle = DecimalArabic<br/> 
labelprefix = ""<br/> 
startpage = 6<br/> 
startvalue = 1<br/> 
 
@arg {pdf} pdf PDF document 
@result {number} number of page labels */ 
function startGetPageLabels(pdf) {} 
 
/** Gets page label data. Call startGetPageLabels to find out how many 
there are, then use these serial numbers to get the style, prefix, offset 
and start value (note not a range). Call endGetPageLabels to clean up.<br/><br/> 
 
For example, a document might have five pages of introduction with roman 
numerals, followed by the rest of the pages in decimal arabic, numbered from 
one:<br/><br/> 
 
labelstyle = LowercaseRoman<br/> 
labelprefix = ""<br/> 
startpage = 1<br/> 
startvalue = 1<br/></br> 
 
labelstyle = DecimalArabic<br/> 
labelprefix = ""<br/> 
startpage = 6<br/> 
startvalue = 1<br/> 
 
@arg {number} n serial number 
@result {"label style"} page label style */ 
function getPageLabelStyle(n) {} 
 
/** Gets page label data. Call startGetPageLabels to find out how many 
there are, then use these serial numbers to get the style, prefix, offset 
and start value (note not a range). Call endGetPageLabels to clean up.<br/><br/> 
 
For example, a document might have five pages of introduction with roman 
numerals, followed by the rest of the pages in decimal arabic, numbered from 
one:<br/><br/> 
 
labelstyle = LowercaseRoman<br/> 
labelprefix = ""<br/> 
startpage = 1<br/> 
startvalue = 1<br/></br> 
 
labelstyle = DecimalArabic<br/> 
labelprefix = ""<br/> 
startpage = 6<br/> 
startvalue = 1<br/> 
 
@arg {number} n serial number 
@result {string} page label prefix */ 
function getPageLabelPrefix(n) {} 
 
/** Gets page label data. Call startGetPageLabels to find out how many 
there are, then use these serial numbers to get the style, prefix, offset 
and start value (note not a range). Call endGetPageLabels to clean up.<br/><br/> 
 
For example, a document might have five pages of introduction with roman 
numerals, followed by the rest of the pages in decimal arabic, numbered from 
one:<br/><br/> 
 
labelstyle = LowercaseRoman<br/> 
labelprefix = ""<br/> 
startpage = 1<br/> 
startvalue = 1<br/></br> 
 
labelstyle = DecimalArabic<br/> 
labelprefix = ""<br/> 
startpage = 6<br/> 
startvalue = 1<br/> 
 
@arg {number} n serial number 
@result {number} page label offset */ 
function getPageLabelOffset(n) {} 
 
/** Gets page label data. Call startGetPageLabels to find out how many 
there are, then use these serial numbers to get the style, prefix, offset 
and start value (note not a range). Call endGetPageLabels to clean up.<br/><br/> 
 
For example, a document might have five pages of introduction with roman 
numerals, followed by the rest of the pages in decimal arabic, numbered from 
one:<br/><br/> 
 
labelstyle = LowercaseRoman<br/> 
labelprefix = ""<br/> 
startpage = 1<br/> 
startvalue = 1<br/></br> 
 
labelstyle = DecimalArabic<br/> 
labelprefix = ""<br/> 
startpage = 6<br/> 
startvalue = 1<br/> 
 
@arg {number} n serial number 
@result {number} page label range */ 
function getPageLabelRange(n) {} 
 
/** Gets page label data. Call startGetPageLabels to find out how many 
there are, then use these serial numbers to get the style, prefix, offset 
and start value (note not a range). Call endGetPageLabels to clean up.<br/><br/> 
 
For example, a document might have five pages of introduction with roman 
numerals, followed by the rest of the pages in decimal arabic, numbered from 
one:<br/><br/> 
 
labelstyle = LowercaseRoman<br/> 
labelprefix = ""<br/> 
startpage = 1<br/> 
startvalue = 1<br/></br> 
 
labelstyle = DecimalArabic<br/> 
labelprefix = ""<br/> 
startpage = 6<br/> 
startvalue = 1<br/> */ 
function endGetPageLabels() {}