API referencePDF/A & Conformance

pdfAddPageLabel

Add a /PageLabels numbering-style range starting at a

C
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);
Delphi
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.

ParameterDescription
IPDFDocument handle.
StartRange1-based page where this numbering style begins.
FormatNumbering style (decimal, roman, alpha, none).
PrefixOptional label prefix string.
AddNumStarting number offset.

Return value. The new label's handle; 0 on failure.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
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);
Area
PDF/A & Conformance
Category

Content Creation

Exported names

pdfAddPageLabelA pdfAddPageLabelW

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.