DrawMaxiCodeA

Small Business, barcodes

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 DrawMaxiCode and string arguments are interpreted using the current SetAnsiMode code page

Syntax

Delphi

Function DLDrawMaxiCodeA(InstanceID: Integer; Left: Double; Top: Double; Width: Double; Height: Double; Text: PAnsiChar; Primary: PAnsiChar; Mode: Integer): Integer;

DLL

int DLDrawMaxiCodeA(int InstanceID, double Left, double Top, double Width, double Height, const char* Text, const char* Primary, int Mode);

Mode accepts 2 through 6; modes 2 and 3 require Primary containing the postal code followed by the three-digit country code and three-digit service class

Mode 2 accepts one through nine postal-code digits; mode 3 accepts one through six postal-code letters, digits or spaces; modes 4 through 6 require an empty primary string; mode 6 is reserved for scanner maintenance

The payload is Text; the requested box preserves the symbol aspect ratio, hexagonal cells and central target

PDF.DrawMaxiCode(50, 700, 100, 100, 'Shipment 12345', '', 4);

Returns 1 on success or 0 on failure; Professional barcodes describes edition requirements, deployment and errors