Custom America Print API: Sample Code

Status:

Result Of Print Operation:


General

Cut

0 = total cut, 1 = partial cut, if supported

Feed

Printing Text

Print Text

Pass -1 to use maximum possible width

1 = adds line feed at end of text, 0 = no line feed

1 = wrap on, 0 = wrap off


Printing Images

Print

Relative path to local image or URL to remote image

0 = left, -1 = center, -2 = right

0 = no scaling, ignore excess size 1 = scaled to fit the paper width 2 = scaled to fit the width parameter

Pass -1 to use max available print width


Printing 2D Barcodes

Print 2D Barcode
-101 = QRCODE -102 = MICROQRCODE -103 = DATAMATRIX
-104 = PDF417 -105 = MICROPDF417 -106 = AZTEC

0 = Left, -1 = Center, -2 = Right

Pass -1 to use max available print width


Printing Barcodes

Print Barcode
-1 = CODEBAR -2 = UPCA -3 = UPCE -4 = EAN13 -5 = EAN8
-6 = CODE39 -7 = ITF -8 = CODE93 -9 = CODE128 -10 = CODE32

0 = left, -1 = center, -2 = right

0 = no HRI on the barcode 1 = HRI on TOP of the barcode
2 = HRI on BOTTOM of the barcode 3 = HRI on TOP and BOTTOM of the barcode

Referred to the narrow bar [1,2,3]


Formatting

Get Page Width
Return current Set

0 = font size is 1X, 1 = 2X, 2 = 3X, etc.

Return current Set

0 = font size is 1X, 1 = 2X, 2 = 3X, etc.

Return current Set
Return current Set
Return current Set
Return current Set

0 = left, 1 = center, 2 = right

Return current Set

0 = font type is A, 1 = font type is B

Return current Set
0 = printer default 1 = Russian (PC866) 2 = Turkish (PC857)
3 = East Europe (PC852) 4 = Israeli (PC862) 5 = Greek (PC737)