API reference › PDF/A & Conformance
pdfAddPageLabel
Add a /PageLabels numbering-style range starting at a
int32_t __stdcall pdfAddPageLabelA(PPDF IPDF, uint32_t StartRange, TPageLabelFormat Format, const char* Prefix, int32_t AddNum);
int32_t __stdcall pdfAddPageLabelW(PPDF IPDF, uint32_t StartRange, TPageLabelFormat Format, const wchar_t* Prefix, int32_t AddNum);
function pdfAddPageLabelA(const IPDF: PPDF; StartRange: Cardinal; Format: TPageLabelFormat; const Prefix: PAnsiChar; AddNum: Integer): Integer; stdcall;
function pdfAddPageLabelW(const IPDF: PPDF; StartRange: Cardinal; Format: TPageLabelFormat; const Prefix: PWideChar; AddNum: Integer): Integer; stdcall;
Purpose. Add a /PageLabels numbering-style range starting at a given page.
Description. Both delegate to AddPageLabel; Prefix is transcoded via PWideToPdfText for the W form (this SDK's shared Unicode-safe PDF text-string encoder, used consistently across the manual wherever cited) vs. a raw ANSI pass-through for A.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
StartRange | 1-based page where this numbering style begins. |
Format | Numbering style (decimal, roman, alpha, none). |
Prefix | Optional label prefix string. |
AddNum | Starting number offset. |
Return value. The new label's handle; 0 on failure.
C# (P/Invoke)
public static extern int pdfAddPageLabelA(IntPtr IPDF, uint StartRange, TPageLabelFormat Format, [MarshalAs(UnmanagedType.LPStr)] string Prefix, int AddNum);
public static extern int pdfAddPageLabelW(IntPtr IPDF, uint StartRange, TPageLabelFormat Format, [MarshalAs(UnmanagedType.LPWStr)] string Prefix, int AddNum);
Content Creation
pdfAddPageLabelA
pdfAddPageLabelW
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.