pdfDeletePageLabels
Read/clear the document's /PageLabels number-tree ranges
BOOL32 __stdcall pdfGetPageLabel(PPDF IPDF, uint32_t Index, TPDFPageLabel* Lbl);
int32_t __stdcall pdfGetPageLabelCount(PPDF IPDF);
void __stdcall pdfDeletePageLabels(PPDF IPDF);
function pdfGetPageLabel(const IPDF: PPDF; Index: Cardinal; var Lbl: TPDFPageLabel): LongBool; stdcall;
function pdfGetPageLabelCount(const IPDF: PPDF): Integer; stdcall;
procedure pdfDeletePageLabels(const IPDF: PPDF); stdcall;
Purpose. Read/clear the document's /PageLabels number-tree ranges (custom page-numbering schemes, e.g. roman-numeral front matter followed by arabic body pages).
Description. pdfGetPageLabel's output Lbl.PrefixUni is always False — the prefix string is only ever exposed as an ANSI PAnsiChar (Lbl.Prefix), with its length manually walked to the null terminator to fill Lbl.PrefixLen; there is no wide-prefix output path despite the PrefixUni flag's presence implying one might exist.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Index | *(GetPageLabel only)* 0-based index into the label-range list. |
Lbl | Output: StartRange, Format, FirstPageNum, Prefix/PrefixLen (ANSI only — PrefixUni always False). |
Return value. pdfGetPageLabel: True if Index is in range. pdfGetPageLabelCount: the range count; 0 if IPDF invalid. pdfDeletePageLabels: none (removes all label ranges).
C# (P/Invoke)
public static extern void pdfDeletePageLabels(IntPtr IPDF);
Core
pdfDeletePageLabels
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.