Name
doc:AddPageLabel -- add page labeling range
Synopsis
status = doc:AddPageLabel(pagenum, style, firstpage[, prefix])
Function
doc:AddPageLabel() adds a page labeling range for the document. The page label is shown in the thumbnails view.

style must be one of the following special constants:

#HPDF_PAGE_NUM_STYLE_DECIMAL:
Arabic numerals (1 2 3 4).

#HPDF_PAGE_NUM_STYLE_UPPER_ROMAN:
Uppercase roman numerals (I II III IV).

#HPDF_PAGE_NUM_STYLE_LOWER_ROMAN:
Lowercase roman numerals (i ii iii iv).

#HPDF_PAGE_NUM_STYLE_UPPER_LETTERS:
Uppercase letters (A B C D).

#HPDF_PAGE_NUM_STYLE_LOWER_LETTERS:
Lowercase letters (a b c d).

When doc:AddPageLabel() succeeds, it returns #HPDF_OK. Otherwise, it returns an error code and the error handler is invoked.

Inputs
pagenum
the first page that applies this labeling range
style
a valid numbering style (see above)
firstpage
the first page number to use
prefix
optional: the prefix for the page label
Results
status
status code
Errors
#HPDF_INVALID_DOCUMENT - An invalid document handle was set.

#HPDF_FAILED_TO_ALLOC_MEM - Memory allocation failed.

#HPDF_PAGE_NUM_STYLE_OUT_OF_RANGE - An invalid page numbering style is specified.


Show TOC