DrawMicroQRCode
Vector graphics, Barcodes
Description
Draws a Micro QR Code (ISO/IEC 18004, symbols M1 to M4) as vector graphics
Syntax
Delphi
Function TPDFlib.DrawMicroQRCode(Left, Top, SymbolSize: Double; Const Text: WideString; ECLevel, DrawOptions: Integer): Integer;Parameters
| Left | Horizontal co-ordinate of the left edge of the symbol |
|---|---|
| Top | Vertical co-ordinate of the top edge of the symbol |
| SymbolSize | Width and height of the symbol, without a quiet zone |
| Text | The data to encode |
| ECLevel | 0 = L, 1 = M, 2 = Q. Level 0 also allows the M1 symbol, which only detects errors |
| DrawOptions | 0 = upright, 1, 2 and 3 turn the symbol as for DrawQRCode |
Return values
| 0 | The text is empty or does not fit an M4 symbol at the requested level, or a parameter is out of range |
|---|---|
| 1 | The symbol was drawn |
Remarks
The smallest symbol that holds the text at the requested level is chosen, from 11 x 11 modules (M1) to 17 x 17 (M4). Digits use numeric mode, upper-case letters, digits and space $ % * + - . / : use alphanumeric mode from M2, and anything else uses byte mode from M3: Latin-1 text as single bytes, other text as UTF-8. M4 holds up to 35 digits, 21 alphanumeric characters or 15 bytes at level L
Micro QR Codes need a quiet zone of at least two modules around them; leave that space clear of other drawing. The symbol is drawn in the current fill colour on a white square
Example
PDF.DrawMicroQRCode(50, 750, 40, 'A-1024', 1, 0);