Barcode parameters |
Start page Previous page Next page |
The creation process can be influenced with the following barcode parameters. A variety of functions are available for use here. In addition to functions such as size and position, rotation or the page area on which the barcode is to be displayed can also be defined.
N2PDFOPTION_BARCODE_TYPE The following value can be used to define the desired barcode type and the following values are allowed.
Const N2PDFVALUE_BARCODE_TYPE_AZTEC = "aztec" Const N2PDFVALUE_BARCODE_TYPE_CODABAR = "codabar" Const N2PDFVALUE_BARCODE_TYPE_CODE128 = "code128" Const N2PDFVALUE_BARCODE_TYPE_CODE39 = "code39" Const N2PDFVALUE_BARCODE_TYPE_DATAMATRIX = "datamatrix" Const N2PDFVALUE_BARCODE_TYPE_EAN13 = "ean13" Const N2PDFVALUE_BARCODE_TYPE_EAN8 = "ean8" Const N2PDFVALUE_BARCODE_TYPE_ITF = "itf" Const N2PDFVALUE_BARCODE_TYPE_PDF417 = "pdf417" Const N2PDFVALUE_BARCODE_TYPE_QRCODE = "qrcode" Const N2PDFVALUE_BARCODE_TYPE_UPCA = "upca"
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_BARCODE_TYPE, N2PDFVALUE_BARCODE_TYPE_QRCODE, "" ) Or Call N2PDFSetOption ( JobID, N2PDFOPTION_BARCODE_TYPE, "qrcode", "" )
All barcode elements have a number of basic attributes in common. These attributes are described below.
N2PDFOPTION_BARCODE_VALUE(Default: "") Contains the value that should be encoded in the barcode. Depending on the selected barcode format, there may be specific criteria for the data structure.
N2PDFOPTION_BARCODE_PAGES(Default: "") The page range for generating barcodes. Individual pages or a range of pages can be defined here. If the text is empty, the entire file will be exported (e.g.: "1-10" or "1,2,5-10")
N2PDFOPTION_BARCODE_CHARSET(Default: "utf-8") Used to specify the character set in which the barcode contents should be stored.
N2PDFOPTION_BARCODE_ROTATION(Default: 0) Used to specify the barcode’s rotation in 90-degree increments. When there is a value that falls under a full 90-degree increment, the next higher increment will be automatically selected.
N2PDFOPTION_BARCODE_MARGIN(Default: 0) Used to specify the width of the empty frame that should be generated around the barcode.
N2PDFOPTION_BARCODE_POS_X(Default: 0) The barcode’s X-axis position.
N2PDFOPTION_BARCODE_POS_Y(Default: 0) The barcode’s Y-axis position
N2PDFOPTION_BARCODE_POS_WIDTH(Default: 0) The barcode’s width
N2PDFOPTION_BARCODE_POS_HEIGHT(Default: 0) The barcode’s height
N2PDFOPTION_BARCODE_COORDINATES(Default: "user") Used to specify the coordinate system for the arguments.
N2PDFOPTION_BARCODE_METRICS(Default: 0) Unit for the X-axis/Y-axis position and barcode height and width arguments:
In addition to the common basic attributes, there are also a number of settings that apply to individual barcodes only. These settings are described below.
For N2PDFVALUE_BARCODE_TYPE_AZTEC:
N2PDFOPTION_BARCODE_ERROR_CORRECTION(Default: 7) Used to adjust the error correction level for generated Aztec Codes. The higher the level, the more error-resistant the barcode, ensuring that damaged codes will still be readable. A percentage value of one to one hundred can be entered.
N2PDFOPTION_BARCODE_LAYERS(Default: 0) Used to specify the number of layers that the generated Aztec Code should use. The higher the number, the larger the resulting barcode and its capacity.
N2PDFVALUE_BARCODE_TYPE_DATAMATRIX
N2PDFOPTION_BARCODE_ERROR_CORRECTION(Default: 2) Used to adjust the error correction level for generated Data Matrix codes. The higher the level, the more error-resistant the barcode, ensuring that damaged codes will still be readable. A level of 1 to 8 can be specified.
N2PDFOPTION_BARCODE_SHAPE(Default: "default") Can be used to force a specific shape for generated Data Matrix codes.
N2PDFVALUE_BARCODE_TYPE_QRCODE
N2PDFOPTION_BARCODE_ERROR_CORRECTION(Default: "l") Used to adjust the error correction level for generated QR codes. The higher the level, the more error-resistant the barcode, ensuring that damaged codes will still be readable.
N2PDFVALUE_BARCODE_TYPE_PDF417
N2PDFOPTION_BARCODE_ERROR_CORRECTION(Default: 2) Used to adjust the error correction level for generated PDF417 codes. The higher the level, the more error-resistant the barcode, ensuring that damaged codes will still be readable. A level of 1 to 8 can be specified.
N2PDFOPTION_BARCODE_COMPACT(Default: false) If this value is set to "true," the contents of all generated PDF417 barcodes will be compressed using the encoding selected with the "compactionMode" attribute.
N2PDFOPTION_BARCODE_COMPACTIONMODE(Default: "auto") Can be used to force a specific shape for generated PDF417 barcodes.
N2PDFOPTION_BARCODE_SHAPE(Default: "default") Can be used to force a specific shape for generated PDF417 barcodes.
N2PDFOPTION_BARCODE_DATACODEWORDSMIN Used to specify the minimum number of codewords allowed in a single PDF417 barcode row.
N2PDFOPTION_BARCODE_DATACODEWORDSMAX Used to specify the maximum number of codewords allowed in a single PDF417 barcode row.
N2PDFOPTION_BARCODE_SYMPERCODEWORDMIN Used to specify the minimum number of code symbols that are allowed to be in a single codeword in the PDF417 barcode.
N2PDFOPTION_BARCODE_SYMPERCODEWORDMAX Used to specify the maximum number of code symbols that are allowed to be in a single codeword in the PDF417 barcode.
|