The text of a manual · part 7 of 14
A795 Two-Color Thermal Receipt Printer User Guide: Programming Supplement, pages 61 to 70
Pages 61 to 70 of 136
The original document is the PDF (980 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Axiohm A795
Page 61
A795 User Guide: Programming Supplement
Revision E May 2005
61
Chapter 4: Programming commands
Select international character set ASCII: ESC t n Hexadecimal: 1B 74 n Decimal: 27 116 n Value of n: A795 native mode emulation
A793 emulation
Application Compatible Escape Command (1B 52 n only)
0 = Code Page 437
0 = Code Page 437
0 = U.S.A.
1 = Code Page 850
Not 0 = Code Page 850
1 = France
2 = Code Page 852
2 = Germany
3 = Code Page 860
3 =-U.K.
4 = Code Page 863
4 = Denmark I
5 = Code Page 865
5 = Sweden
6 = Code Page 858
6 = Italy
7 = Code Page 866
7 = Spain
8 = Code Page 1252
8 = Japan
9 = Code Page 862
9 = Norway
10 = Code Page 737, Greek (in A795 native mode and A794 emulation)
Default:
0 (Code Page 437)
Selects the character set to be used. Look in “Appendix B: Resident Character Sets” in the A795 User Guide Programming Supplement for the character sets. There are two codes for this command (See “Select international character code, 1B 52 n.) Both codes perform the same function.
Related information
The LEGACY emulation selection applies only to the command “Select international character code” (1B 52 n). The LEGACY emulation generates the same as A795 native mode for the command “Select international character set” (1B 74 n).
Select or cancel upside-down print mode ASCII Hexadecimal Decimal Value of n:
ESC { n 1B 7B n 27 123 n 0 = Cancel 1 = Set
Default:
0 (Cancel)
Prints upside-down characters. The command may be combined with clockwise rotated print (1B 56) or counter-clockwise rotated print (1B 12). The character order is inverted in the buffer so text is readable. Only bit 0 is used. Bits 1-7 are not used. See summary of rotated printing in this document for more information.
Exceptions
The command is valid only at the beginning of a line. It cannot be used with right side up characters on the same line.
Page 62
62
A795 User Guide: Programming Supplement
Revision E May 2005
Chapter 4: Programming commands
Select character size ASCII GS ! n Hexadecimal 1D 21 n Decimal 29 33 n
Value of n: font
1–8 = vertical number of times active 1–8 = horizontal number of times active font
Range of n:
00–07, 10–17, ...70–77
Default of n:
11 hexadecimal
Selects the character height using bits 0 to 2 and selects the character width using bits 4 to 6, as follows: With smoothing enabled, maximum value of 0+n is 66. Character width selection
This command is effective for all characters (except for HRI characters). In standard mode, the vertical direction is the paper feed direction, and the horizontal direction is perpendicular to the paper feed direction. However, when character orientation changes in 90 degree clockwise-rotation mode, the relationship between vertical and horizontal directions is reversed. In page mode, vertical and horizontal directions are based on the character orientation. When characters are enlarged with different sizes on one line, all the characters on the line are aligned at the baseline.
Hex
Decimal
Width
00
0
1 (normal)
10
16
2 (two times width)
20
32
3 (three times width)
30
48
4 (four times width)
40
64
5 (five times width)
50
80
6 (six times width)
60
96
7 (seven times width)
In native mode, the vertical direction is limited to 7 (seven times height) when Tall or ColorPOS® font is selected. If 8 (eight times height) is selected, the results are unspecified.
70
112
8 (eight times width)
Related information
The select print mode (1B 21 n) command can also select or cancel double-width and double-height modes. However, the setting of the last received command is effective. Exceptions
If n is out of the defined range, this command is ignored.
In A793 emulation, this command is discarded and not put into print buffer. Character height selection Hex
Decimal
Height
00
0
1 (normal)
01
1
2 (two times height)
02
2
3 (three times height
03
3
4 (four times height)
04
4
5 (five times height)
05
5
6 (six times height)
06
6
7 (seven times height)
07
7
8 (eight times height)
Page 63
Revision E May 2005
A795 User Guide: Programming Supplement
63
Chapter 4: Programming commands
Select or cancel white/black reverse print mode ASCII GS B n Hexadecimal 1D 42 n Decimal 29 66 n Value of n:
0 = Off 1 = On (When 0 and 1 are the least significant bit, LSB)
Range of n:
0–255
Default:
0 (Off)
Turns on white/black reverse print mode. In white/black reverse print mode, print dots and non-print dots are reversed, which means that white characters are printed on a black background. When the white/black reverse print mode is selected it is also applied to character spacing which is set by right-side character spacing (1B 20). This command can be used with built-in characters and user-defined characters, but does not affect the space between lines.
White/black reverse print mode has a higher priority than underline mode. When underline mode is on and white/black reverse print mode is selected, underline mode is disabled, but not canceled. Bar codes, logos, and bit images are not affected by this command. Exceptions
Only the lowest bit of n is valid. Related information
If the current color is not black and two-color paper is loaded, no visible effect takes place. In A793 emulation, the command is unrecognized and the parameter byte is put into the print buffer.
White/black reverse print mode does not affect bit image, downloaded bit image, bar code, HRI characters, and spacing skipped by horizontal tab (09), set absolute starting position (1B 24 …), and set relative print position (1B 5C).
Reverse color text mode (ColorPOS®) ASCII GS 0x85 m n Hexadecimal 1D 85 m n Decimal 29 133 m n Value of m:
0 = white 1 = black 2 = paper color
Value of n:
0 = white 1 = black 2 = paper color
Default:
m = 0 (off)
Sets a mode for reverse printing effects on text. The background color is specified by m, while the text color is specified by n. Setting m = 0 turns off the mode.
If m = n but not zero, the printer produces solid printing in the given color. This tactic can be used to minimize the firmware busy work. The value of current color and white/black reserve print mode is superceded by the value of n whenever this mode is on (m>0). Bar codes, logos, and bit images are not affected by this command.
Page 64
64
A795 User Guide: Programming Supplement
Revision E May 2005
Chapter 4: Programming commands
Text strike-through mode (ColorPOS®) ASCII GS 0x85 m n Hexadecimal 1D 8D n m Decimal 29 141 n m Value of m: itself
0 = retain same color as the character 1 = black 2 = paper color
Value of n:
standard cell height
Default:
n = 0 (off)
When characters are greater than normal size, such as double-high, the number of character rows claimed by n also increases proportionally, such as doubling for double-high cells. Location of the strike-through on a cell is on a cell-by-cell basis, so mixing cell sizes on the same print row will give uneven results.
Prints a strike-through over characters. If the strikethrough is as wide as the cell height, this will produce a cell that will be printed as a solid current color.
Select superscript or subscript modes ASCII AX ENQ n Hexadecimal 1F 05 n Decimal 31 05 n Value of n:
Default:
0 = Normal character size 1 = Select subscript size 2 = Select superscript size 0 (normal size)
Exceptions
This command is ignored if n is out of the specified range. Related information
Turns superscript or subscript modes on or off. This attribute may be combined with other characters size settings commands (12, 13, 1B 21 n, 1D 21 n,…)
In A793 emulation, this command is unrecognized and the parameter byte is put into the print buffer.
Page 65
Revision E May 2005
A795 User Guide: Programming Supplement
65
Chapter 4: Programming commands
Graphics These commands are used to enter and print graphics data and are described in order of their hexadecimal codes. These commands describe operation for 80mm paper. If the printer supports 82.5mm paper, the dot spacing is the same but there are 640 printable dots rather than 576 printable dots on 80 mm paper.
Download BMP logo ASCII: ESC (+*.BMP file) Hexadecimal: 1B (+*.BMP file) Decimal: 27 66 77(+*.BMP file) Value:
Maximum width = 576 (640 for 82.5mm paper) Maximum height = 512
Enters a downloaded BMP logo into RAM or flash. The downloaded BMP logo can be printed by using the print downloaded bit image (1D 2F m) command. To downloaded BMP file to save it as a logo, send the hexadecimal code 1B followed by the whole BMP file. The printer decodes the BMP file header and will save the image data after checking important parameters, such as: - Width, - Height, - Number of colors (only monochrome images are accepted)
BMPs and bit images continue to be definable only for the receipt station. However, there is no longer an automatic erasure whenever the user downloads a character set (as happened previously) as well as in the case where the current logo was never set > 0, (the automatic erasure if user flash memory had filled up with inactive logo 0 definitions upon next power cycle). Warnings about the effect of running out of defined logo space during a download apply (i.e. the command is ignored). The application is required to manage user data space, downloaded font space, and logo space. After downloading a logo to the printer, wait 100ms to allow the printer time to write the logo to flash. Exceptions
BMP file images that are not monochrome are put into the print buffer. Related information
Microsoft BMP bitmap file format. This command is recognized in A795 native mode and in A794 emulation. In A793 and LEGACY emulations, the BMP file bytes are put into the print buffer.
Page 66
66
A795 User Guide: Programming Supplement
Revision E May 2005
Chapter 4: Programming commands
Select bit image mode ASCII ESC * m n1 n2 d1 ... dn Hexadecimal 1B 2A m n1 n2 d1 ... dn Decimal 27 42 m n1 n2 d1 ... dn Value of m: Value of m
Mode
No. of dots (vertical)
No. of dots (horizontal)
No. of dots/line
0
8-dot single-density
8 (68 DPI)
0–288 (101 DPI)
8 x 288
1
8-dot double-density
8 (68 DPI)
0–576 (203 DPI)
8 x 576
32
24-dot single-density
24 (203 DPI)
0–288 (101 DPI)
24 x 288
33
24-dot double-density
24 (203 DPI)
0–576 (203 DPI)
24 x 576
Value of n: Value of n (8-dot single-density mode)
Value of n (24-dot single-density mode)
Value of d n1 + (256 x n2)
3 x [n1 + (256 x n2)]
Number of bytes of data*
*Printed left to right (8-dot mode); printed down then across (24-dot mode) Formulas 8-dot single-density= n1 + (256 X n2) 24-dot single-density= 3 X [n1+ (256 X n2)]
Sets the print resolution and enters one line of graphics data into the print buffer. Excess data is accepted but ignored. Any print command is required to print the data, after which the printer returns to normal processing mode.
See the illustration for graphic representations of the bit image below.
24-Dot single-density mode Top of bit image
8-Dot single-density mode
Receipt MSB
Top of bit image d1 d4 d7 MSB d1 d2 d3 d4 dn dn d2 d5 dn
LSB d3 d6 dn LSB
Page 67
A795 User Guide: Programming Supplement
Revision E May 2005
67
Chapter 4: Programming commands
Print advanced raster graphics ASCII ESC . m n rL rH d1 … dn Hexadecimal 1B 2E m n rL rH d1 … dn Decimal 27 46 m n rL rH d1 … dn Value of m:
horizontal offset from left margin = 8 x m dots
Value of n:
number of data bytes that compose the raster
Value of r:
number of times the raster has to be printed =256 x rH + rL d1 … dn:
data bytes
Range:
0<= m <= 72 0<= n <= 72 0<= r <= 65535 0<= d1 … dn <= 255
Prints a horizontal raster of graphics data one or multiple times. Horizontal offset and number of data bytes are variable and specified by parameters. Exceptions
Advanced raster graphics is not available in page mode.
Select single-density graphics ASCII ESC K n1 n2 d1 ... dn Hexadecimal 1B 4B n1 n2 d1 ... dn Decimal 27 75 n1 n2 d1 ... dn Value of n: Value of n (8-dot single-density mode)
Value of d n1 + (256 x n2)
Number of bytes of data (printed down, then across)
Enters one line of 8-dot single-density graphics into the print buffer. Any print command is required to print the line, after which the printer returns to normal processing mode. Single-density mode allows 0–288 dot columns. The number of bytes sent is represented by the formulas in the table.
Each bit corresponds to two horizontal dots. Compare to set bit image mode (1B 2A, m=0) earlier in this document. Related information
In LEGACY emulation, this command is unrecognized and the parameters are put into the print buffer.
Page 68
68
A795 User Guide: Programming Supplement
Revision E May 2005
Chapter 4: Programming commands
Select double-density graphics ASCII ESC Y n1 n2 d1 ... dn Hexadecimal 1B 59 n1 n2 d1 ... dn Decimal 27 89 n1 n2 d1 ... dn Value of n: Value of n (8-dot single-density mode)
Value of d n1 + (256 x n2)
Number of bytes of data (printed down, then across)
Enters one line of 8-dot double-density graphics into the print buffer. Any print command is required to print the line, after which the printer returns to normal processing mode. Double-density mode allows 0–576 dot columns. The number of bytes sent is represented by the formulas in the table.
Each bit corresponds to one horizontal dot. Compare to set bit image mode (1B 2A, m=1) earlier in this document. Related information
In LEGACY emulation, this command is unrecognized and the parameters are put into the print buffer.
Select the current logo ASCII GS # n Hexadecimal 1D 23 n Decimal 29 35 n Range of n:
0 – 255
Default:
0
Selects a color or monochrome logo to be defined or printed. The active logo n remains in use until this command is sent again with a different logo n. When this command precedes a logo definition, that definition is stored in flash or RAM memory as logo n. If there is already a different definition in flash memory for logo n, the first is inactivated and the new definition is used. The inactive definition is not erased from flash and continues to take up space in flash memory. When this command precedes a logo print command and n is different from the previously active logo selected, the printer retrieves the logo definition for n from flash or RAM memory and prints it. If there is no definition for logo n, then no logo is printed.
In the case of a previously existing application that expects only one possible logo, the printer will not receive the select current logo (1D 23 n) command. In this case, the printer assigns 0 as the active logo identifier. It automatically stores any new logo definition in flash memory as logo 0, inactivating any previous logo 0 definition. If the flash memory space available for logos fills up with inactive logo 0 definitions, the firmware erases the old definitions at the next power cycle. This is the only case in which the printer erases flash memory without an application command. In the case of a new application using multiple logos, the select current logo (1D 23 n) command is used. After that, the printer no longer automatically erases the logo definition flash memory page when it fills with multiple definitions. A new application using multiple logos, writing a user-defined character set into flash memory, or both, is responsible for erasing the logo and userdefined character set flash memory page when the logo area is full or before a new character set is defined. Related information
This command is recognized in A795 native mode and A794 emulation. In A793 and LEGACY emulations, the parameters are put into the print buffer.
Page 69
A795 User Guide: Programming Supplement
Revision E May 2005
69
Chapter 4: Programming commands
Define downloaded bit image ASCII GS * n1 n2 d1 ... dn] Hexadecimal 1D 2A n1 n2 d1 ... dn] Decimal 29 42 n1 n2 d1 ... dn] Value of n: Value of n1 1–72 (8 x n1 = number of horizontal dot columns)
Value of n2
Value of d
1–64 (number of vertical bytes)
1
Bytes of data (printed down, then across)
1
The number of bytes sent is represented by the following formula: n = 8 x n1 x n2 (n1 x n2 must be less than or equal to 4608).
Enters a downloaded bit image (such as a logo) into RAM or flash with the number of dots specified by n1 and n2. If in RAM, the downloaded bit image is available until power is turned off, another bit image is defined, or initialize printer (1B 40) command is received. This bit image will be saved as a monochrome logo indexed by current value that was last set by the select current logo command or 0 is a select current logo command had not yet been given.
See the illustration below for a graphic representation of the downloaded bit image.
Column one
Top of graphic
Column 72 x 8 max.
Row one d1 d 65 d2
MSB dn Row 64 d max. 64 dn LSB
Page 70
70
A795 User Guide: Programming Supplement
Revision E May 2005
Chapter 4: Programming commands
Print downloaded bit image ASCII GS / m Hexadecimal 1D 2F m Decimal 29 47 m Value and range of m:
This command is used to print a previously stored monochrome or color logo from printer memory on the receipt station. The logo is identified as the one indicated by the most recent select current logo command or 0 if a select current logo command has not yet been given. Parameter m is interpreted as follows: Value of m Print mode DPI
Vertical DPI
Horizontal
0
Normal
203
203
1
Double wide
203
101
2
Double high
101
203
3
Quadruple
101
101
The indexed downloaded bit image from RAM or flash will be printed on the receipt station at a size specified by m. If the bit image is a monochrome one, it is printed in the current color; otherwise it is printed as a twocolor image. If doubling or quadrupling exceeds the print paper width maximums (576 or 640 with 82.5mm paper) the left side of the image is printed and the bits to the right of the maximum column are discarded. If the available width is greater than the bit image, its printing will adhere to any currently set right, left, or center justification. This command is ignored if the index refers to an undefined logo/ bit image.
Print raster monochrome graphics (ColorPOS®) ASCII GS 0x82 n1…..n72 (576 dots) for 80 mm paper, or n80 (640 dots) for 82.5 mm paper Hexadecimal 1D 82 n1…..n72 (576 dots) for 80 mm paper, or n80 (640 dots) for 82.5 mm paper Decimal 29 130 n1…..n72 (576 dots) for 80 mm paper, or n80 (640 dots) for 82.5 mm paper Value and range of n:n1 to n72/n80 corresponds to one dot row data for a thermal receipt printer.
Each bit defines whether or not a dot of the current color will be printed. This command is used for printing a monochrome graphic in real-time. Offsets, page and any other modes or overlays, including watermark do not apply and are overridden by this command. A complete rendering of the intended final image should have been done by the application before sending the dot rows. If two-color paper is indicated by the set paper type command, then the raster will be printed in the color that is defined by the set current color command.
MSB n1 n2 n n3
LSB
...
n72/80