AddBatesNumberingA

Page manipulation

Requires the Small Business edition — in Delphi, C++Builder and Lazarus code create the library as TPDFlibSmallBusiness (unit PDFlibSmallBusiness) or TPDFlibEnterprise; the Small Business and Enterprise DLL and ActiveX builds provide it unchanged; the Single edition keeps the method, which returns 0 and sets LastErrorCode to 901 (PDFLIB_ERROR_SMALLBUSINESS_REQUIRED)

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to AddBatesNumbering and string arguments are interpreted using the current SetAnsiMode code page

Stamps sequential Bates numbers across a range

Syntax

Delphi

Function DLAddBatesNumberingA(InstanceID: Integer; PageRange: PAnsiChar; StartNumber: Integer; Digits: Integer; Position: Integer; FontSize: Double; Prefix: PAnsiChar; Suffix: PAnsiChar): Integer;

DLL

int DLAddBatesNumberingA(int InstanceID, const char* PageRange, int StartNumber, int Digits, int Position, double FontSize, const char* Prefix, const char* Suffix);

Parameters

PageRangePages to stamp; an empty range selects every page
StartNumberNumber stamped on the first page of the range
DigitsZero-padding width, 1..12
Position1..9 following the keypad layout (7 top-left, 8 top-centre, 9 top-right, 1 bottom-left, ...)
FontSizeFinite, positive stamp text size applied on every selected page
Prefix, SuffixText placed before and after the number

Return values

The number of pages stamped

Remarks

The requested size and current font and text colour are applied on every stamped page

The original selected page, origin, selected font and drawing state are restored after stamping, including when processing fails

See also

AddPageFooter, ExpandStampTokens