DrawQRCode

Vector graphics, Barcodes

Description

Draws a QR Code onto the selected page.

Syntax

Delphi

Function TPDFlib.DrawQRCode(Left, Top, SymbolSize: Double; Const Text: WideString; EncodeOptions, DrawOptions: Integer): Integer;

ActiveX

Function PDFlib::DrawQRCode(Left As Double, Top As Double, SymbolSize As Double, Text As String, EncodeOptions As Long, DrawOptions As Long) As Long

DLL

int DLDrawQRCode(int InstanceID, double Left, double Top, double SymbolSize, const wchar_t* Text, int EncodeOptions, int DrawOptions);
int DLDrawQRCodeA(int InstanceID, double Left, double Top, double SymbolSize, const char* Text, int EncodeOptions, int DrawOptions);

Parameters

LeftThe horizontal coordinate of the left edge of the QR Code
TopThe vertical coordinate of the top edge of the QR Code
SymbolSizeThe width and height of the QR Code
TextThe text to encode in the QR Code
EncodeOptionsThe encoding mode plus the error correction level. Mode: 0=Auto 1=Numeric 2=Alphanumeric 3=ISO-8859-1 4=UTF-8 with BOM 5=UTF-8 without BOM. Add 16 for level M, 32 for level Q or 48 for level H; without it the symbol uses level L. For example, 21 encodes UTF-8 without BOM at level M, as a SEPA payment code requires
DrawOptions0 = Normal 1 = Rotate 90 degrees anti-clockwise 2 = Rotate 180 degrees 3 = Rotate 90 degrees clockwise

Return values

0The QR Code could not be drawn, check for an out of range value for the EncodeOptions or DrawOptions parameter.
1The QR Code was drawn successfully.