[barcode]
Output common 1D and 2D type barcode to the document.
Shorthand
bc
instead of the full command name barcode
.[bc: type code39; data 1234]
and [barcode: type code39; data 1234]
are equivalent.Parameters
type
and data
parameters are required for all barcode types.General Parameters
Parameter |
Description |
---|---|
|
Select the barcode type.
Please see Supported Barcode Types and Data Limitations .
|
|
Data to be encoded in the printed barcode.
Content may be limited depending on the barcode type.
For more information, please see Supported Barcode Types and Data Limitations .
|
Parameters for 1D barcodes
Parameter |
Description |
---|---|
|
Height of the barcode to be printed as printer dots, mm (recommended) or % of width.
Defaults to 10mm.
|
|
Barcode module size as dots or mm.
Use 0 to specify minimum.
For more information, please see 1D Barcode Sizing .
|
|
Barcode wide bar module size, for barcode types that support it.
Use 0 to specify the minimum size allowed relative to the standard module size.
For more information, please see 1D Barcode Sizing .
|
|
No value required.
If this parameter is present then HRI (human readable information) will be printed underneath the barcode.
|
Parameters for QrCode 2D Barcodes
Parameter |
Description |
---|---|
|
QRCode cell size as dots or mm.
Use 0 to specify minimum(Range:
1 ~ 8 (dots) ( 0.125mm ~ 1mm )).Note that
0 is equivalent to 1 (dots), and 3 (dots) is the default if this parameter is not specified. |
|
Specify the error correction level when printing QR Code barcodes.
Values may be
low / l , medium / m , quartile / q , high / h .QR Codes printed with greater error correction will be larger for the same data set.
|
|
Specify the QR Code model type.
Supported values are 1 and 2 (default).
Note that model type 2 is the most commonly used and widely supported QR Code type and so recommended.
|
Parameters for PDF417 2D Barcodes
Parameter |
Description |
---|---|
|
Sets the size calculation mode.
Supported values are
ratio (default) or fixed . |
|
If the “size” mode is
ratio then “rows” specifies vertical size ratio.If “size” mode is
fixed then is specifies the number of horizontal rows to be used when rendering.For more information, please see the Ratio Sizing / Fixed Sizing of PDF417 .
|
|
If the “size” mode is
ratio then “columns” specifies the horizontal size ratio.If “size” mode is
fixed then specifies the exact number of symbol columns to use when printing.Note that each column is 17 modules wide.
For more information, please see the Ratio Sizing / Fixed Sizing of PDF417 .
|
|
Barcode module size as dots or mm.
Use 0 to specify minimum(Range:
1 ~ 10 (dots) ( 0.125mm ~ 1.25mm )).Note that
0 is equivalent to 1 (dots), and 2 (dots) is the default if this parameter is not specified. |
|
Specify the vertical size of a single module as a multiplier of the
module value, from 1 to 10. |
|
Specify the error correction level as an integer value from 0 (no error correction) to 8 (maximum error correction).
|
Supported Barcode Types and Data Limitations
[barcode]
command will be ignored.[barcode: type <value>; data <data>]
for the particular barcode type that you need to print.Symbology |
<value> |
Wide Module |
<data> Data Constraints |
---|---|---|---|
EAN8 |
ean8 |
✗ |
7 or 8 numeric characters only.
The 8th is a checksum digit and will be calculated by the printer, so does not need to be provided.
|
JAN8 |
jan8 |
✗ |
Japanese subset of EAN8 specification.
Completely compatible with EAN8 data requirements.
|
EAN13 |
ean13 |
✗ |
12 or 13 numeric characters only.
The 13th is a checksum digit and will be calculated by the printer so does not need to be provided.
|
JAN13 |
jan13 |
✗ |
Japanese subset of EAN13 specification.
Completely compatible with EAN13 data requirements.
|
UPC-E |
upc-e |
✗ |
11 or 12 numeric characters only.
Character 12 is a checksum that will be calculated by the printer and so does not need to be provided
|
UPC-A |
upc-a” |
✗ |
11 or 12 numeric characters only.
Character 12 is a checksum that will be calculated by the printer and so does not need to be provided
|
Interleaved 2 of 5 |
itf |
✔ |
An even number of numerical digits.
If an odd number of digits are provided, then a ‘0’ will be added to the beginning of the data.
|
Code 39 |
code39 |
✔ |
Numerical digits (‘0’ to ‘9’), upper case characters (‘A’ to ‘Z’) and characters ‘ ‘, ‘$’, ‘%’, ‘+’, ‘-’, ‘.’, ‘/’
|
Code 93 |
code93 |
✗ |
Any valid ASCII data (*)
|
Code 128 |
code128 |
✗ |
Any valid ASCII data (*)
|
NW-7 |
nw7 |
✔ |
Numerical digits (‘0’ to ‘9’), limited alphabet characters (‘A’ to ‘D’, and ‘a’ to ‘d’) and characters ‘$’, ‘+’, ‘-’, ‘.’, ‘/’, ‘:’
|
QR Code |
qr |
✗ |
Any valid ASCII data (*)
|
PDF417 |
pdf417 |
✗ |
Any valid ASCII data (*)
|
data
, please enclose the string in "
character as shown below (The "
character at the beginning and end of the string will be excluded from data when converted to a command)."
or \
please use \"` or ``\\
.[barcode: type pdf417; data "1234567890!\"#$%&'()=~|-^\\`{@[+*};:]<>?_,./"]
1D Barcode Sizing
- The
module
andwide-module
values will be adjusted to the closest sizes supported by your output device which are also allowed by the symbology being printed.Set a value of 0 for both in order to request the minimum supported width. - Most symbologies will always generate the same size barcode for the same number of data digits.Where a symbology supports multiple internal character encodings (such as Code 128) the width may vary depending on the data content as well as number of digits.Data will be automatically analyzed and packed in the most efficient way supported by your target device.
If your application requires a larger amount of data or data that may vary in length significantly, then it is recommended to use a 2d symbology instead, such as QR Code of PDF417.
List of module and wide-module for the type of barcode
module
/ wide-module
parameter is not specified or is set to 0.UPC-E / UPC-A / JAN/EAN8 / JAN/EAN13 / Code128 / Code93 |
Code39 / NW-7 |
TF” |
---|---|---|
|
|
|
2 (default) |
2 : 6 |
2 : 5 |
3 |
3 : 9 |
4 : 10 |
4 |
4 : 12 |
6 : 15 |
- |
2 : 5 |
2 : 4 (default) |
- |
3 : 8 |
4 : 8 |
- |
4 : 10 |
6 : 12 |
- |
2 : 4 (default) |
2 : 6 |
- |
3 : 6 |
3 : 9 |
- |
4 : 8 |
4 : 12 |
QR Code
[barcode: type qr; data https://cloudprnt.net/CloudPRNTSDK/Documentation/articles/markup/markupintro.html]
However, it may be desirable to set the cell size (defaults to 3 printer dots) and error correction level.
Note
Kanji is not yet supported.
QR Code Error Correction
settings |
Capability |
---|---|
l/low |
Can read with up to 7% of data obscured/damaged. |
m/medium |
Can read with up to 15% of data obscured/damaged. |
q/quartile |
Can read with up to 25% of data obscured/damaged. |
h/high |
Can read with up to 30% of data obscured/damaged. |
Higher error correction levels will increase the size of a QR Code for the same data, and reduce the maximum data length that can be encoded.
PDF417
type
parameter to pdf417
and providing some data.[barcode: type pdf417; data PDF417 Symbologies can support very long data]
Ratio Sizing
columns
/ width
and rows
/ height
parameters.Fixed Sizing
size
parameter to fixed
, this allows them to also specify the required columns
and/or rows to be printed.columns
may be set to a value from 0 to 30, where 0 allows the output device to choose based on the length of supplied data and error correction level.module
, and in addition space must be allowed for the start/stop patterns and row indicators which in total are equal to 4 columns.rows
may set a value from 3 to 90 to specify the number of rows to be printed.module
x vertical-module
.columns
or rows
parameters.Example
Markup
This is a simple markup example, using only the [barcode] and [cut] commands.
Barcode Examples
EAN 8:
[barcode: type ean8; data "1234567"]
EAN 13:
[barcode: type ean13; data "500274857162"; hri]
Interleaved 2 of 5 (module 3 dot):
[barcode: type itf; data "48129500"; height 20mm; hri; module 3]
Code 39:
[barcode: type code39; data "ABC123"]
Code 39 (module 3, wide module 9):
[barcode: type code39; data "ABC123"; module 3; wide_module 9]
Code 128:
[barcode: type code128; data "Hello World!"]
QR Code:
[barcode: type qr; data "https://cloudprnt.net/CloudPRNTSDK/Documentation/articles/markup/markupintro.html"]
[cut]
Output at 58mm
This is the result when using the markup processor to sent to an mC-Print2 58mm(2inch) printer.

Output at 80mm
This is the result when using the markup processor to sent to a TSP650II 80mm(3inch) printer.
