AddBatesNumbering

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

Stamps sequential Bates numbers across a range

Syntax

Delphi

Function AddBatesNumbering(Const PageRange: WideString; StartNumber, Digits, Position: Integer; FontSize: Double; Const Prefix, Suffix: WideString): Integer; Virtual;

ActiveX

Function PDFlib::AddBatesNumbering(PageRange As String, StartNumber As Long, Digits As Long, Position As Long, FontSize As Double, Prefix As String, Suffix As String) As Long

DLL

int DLAddBatesNumbering(int InstanceID, const wchar_t* PageRange, int StartNumber, int Digits, int Position, double FontSize, const wchar_t* Prefix, const wchar_t* Suffix);
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