THotPDF.SetPageLabel Method
Method summary: THotPDF.SetPageLabel Method
Declaration
procedure SetPageLabel(StartPageIndex: Integer; Style: THPDFPageLabelStyle; const Prefix: AnsiString = ''; StartNumber: Integer = 1);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
StartPageIndex | Zero-based page index where the label range begins |
Style | Numbering style from THPDFPageLabelStyleTHPDFPageLabelStyle |
Prefix | Optional text placed before each generated page number |
StartNumber | First logical number used by this range, starting at 1 or higher |
Usage notes
- The method writes a catalog
/PageLabelsnumber tree whenEndDocfinalises the generated PDF - Calling the method again with the same
StartPageIndexreplaces the earlier range - Where no range starts at the first page, the pages before the first range keep plain decimal numbers, because the number tree has to cover page index 0 (ISO 32000-1 12.4.2)
- A prefix with bytes above 127 is read as UTF-8 and kept as a Unicode text string
- The active PDF version must support page labels, so HotPDF raises or validates PDF 1.3 according to
StrictVersionLock - Page labels change viewer page-number display and do not reorder pages
Related API
- THPDFPageLabelStyle Type
- THotPDF.ClearPageLabels Method