PdfpagelabelsPage Labels
The type for page labels. The page labels of a document, if well-formed, are a list of ts where the startpage values are in increasing numerical order. The numerical page number for the page range is startvalue. The default labelstyle is DecimalArabic. The default labelprefix is the empty string.
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:
labelstyle = LowercaseRoman;
labelprefix = "";
startpage = 1;
startvalue = 1
labelstyle = DecimalArabic;
labelprefix = "";
startpage = 6;
startvalue = 1
For more details, see ISO 32000 12.4.2, but note that in our implementation, pages are 1-based not 0-based, just like PDF page numbers.
val string_of_labelstyle : labelstyle -> stringString of label style e.g DecimalArabic
val string_of_pagelabel : t -> stringDebug string of page label
Return a list where every page has a label - pages which don't are given arabic page numbers
Single label representing a given page. Raises Not_found if no label.
val pagelabeltext_of_pagenumber : int -> t list -> stringReturn the text for a page label. Raises Not_found if no label.
Add a range starting at pagelabel.startpage, ending at the integer page given. The first integer argument is the number of pages in the PDF.
Merge some page labels for some PDFs and page ranges.
Write page labels to a document, replacing any there. Any existing page labels are removed.
val remove : Pdf.t -> unitRemove all page labels. Equivalent to an empty list given to write.