2D Barcode Functions

You can use the QR code or PDF417 2D barcode type in RTF templates. When you create an RTF template, use the qrcode or pdf417 functions to specify the barcode type. These functions don't require external fonts.

qrcode Syntax

<?qrcode: <DATA>; <SIZE>[; <CHARSET>[; <ECLEVEL>[; <GS1FORMAT>[; <MASKPATTERN>[; <QRVERSION>]]]]]?>

where

  • DATA – Data to be encoded in the QR code format.
  • SIZE – QR code size dimension in points(pt).
  • CHARSET – (Optional) Character set for encoding the data. Default is UTF8.
  • ECLEVEL – (Optional) QR code error correction level. Default is "M".

    Valid values are:

    • "H" (~30% correction)
    • "Q" (~25% correction)
    • "M" (~15% correction)
    • "L" (~7% correction)
  • GS1FORMAT – (Optional) Whether to encode data in GS1 format. Enter "true" to encode data using the GS1 standard.
  • MASKPATTERN – (Optional) QR code mask pattern to be used. Default is optimal mask pattern. Valid values are integers (or string representation of integers) from 1 to 7.
  • QRVERSION – (Optional) Exact version of the QR code to be encoded. Default is the version determined by the size of data to be encoded. Valid values are integers (or string representations of integers) from 1 to 40.
For example, the qrcode syntax to generate QR code with data of size 200pixel, high error correction level, GS1 format encoding, QR code version 4, and to use the default values of character set and mask patterns:
<?qrcode: ‘01049123451234591597033130128’; ‘200’;’’ ; ‘H’; ‘true’; ‘’; 4?>

Note the character set and mask patterns are left blank to use the default values.

pdf417 Syntax

<?pdf417: <DATA>[; <XSCALE>[; <COLUMNS>[; <ROWS>[; <CHARSET>]]]]?>

where

  • DATA – Data to be encoded in the PDF417 format.
  • XSCALE – Point(pt) per PDF417 module width. Default is 1 (1pt per module).
  • COLUMNS – The number of columns to be used in the generated PDF417 symbol. Default is -1.
  • ROWS – The number of rows to be used in the generated PDF417 symbol. Default is -1.
  • CHARSET – (Optional) Character set to be used to encode data with the Byte compaction mode. Specify CHARSET only if the data contains non-Latin-1(ISO-8859-1) characters.