diff options
Diffstat (limited to 'doc/developer/reference-html/c464.html')
-rw-r--r-- | doc/developer/reference-html/c464.html | 1702 |
1 files changed, 1702 insertions, 0 deletions
diff --git a/doc/developer/reference-html/c464.html b/doc/developer/reference-html/c464.html new file mode 100644 index 0000000..cb3bede --- /dev/null +++ b/doc/developer/reference-html/c464.html @@ -0,0 +1,1702 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> +<HTML +><HEAD +><TITLE +>ESC/P2</TITLE +><META +NAME="GENERATOR" +CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK +REL="HOME" +TITLE="The Developer's Guide to Gutenprint" +HREF="index.html"><LINK +REL="PREVIOUS" +TITLE="The driver file" +HREF="x271.html"><LINK +REL="NEXT" +TITLE="Remote Mode Commands" +HREF="x955.html"></HEAD +><BODY +CLASS="chapter" +BGCOLOR="#FFFFFF" +TEXT="#000000" +LINK="#0000FF" +VLINK="#840084" +ALINK="#0000FF" +><DIV +CLASS="NAVHEADER" +><TABLE +SUMMARY="Header navigation table" +WIDTH="100%" +BORDER="0" +CELLPADDING="0" +CELLSPACING="0" +><TR +><TH +COLSPAN="3" +ALIGN="center" +>The Developer's Guide to Gutenprint</TH +></TR +><TR +><TD +WIDTH="10%" +ALIGN="left" +VALIGN="bottom" +><A +HREF="x271.html" +ACCESSKEY="P" +>Prev</A +></TD +><TD +WIDTH="80%" +ALIGN="center" +VALIGN="bottom" +></TD +><TD +WIDTH="10%" +ALIGN="right" +VALIGN="bottom" +><A +HREF="x955.html" +ACCESSKEY="N" +>Next</A +></TD +></TR +></TABLE +><HR +ALIGN="LEFT" +WIDTH="100%"></DIV +><DIV +CLASS="chapter" +><H1 +><A +NAME="AEN464" +></A +>Chapter 5. ESC/P2</H1 +><P +> This is a description of the ESC/P2 raster commands used by the + Gutenprint printer driver, which is a subset of the complete + command set. The full documents are found on <A +HREF="http://www.ercipd.com/isv/edr_docs.htm" +TARGET="_top" +> <I +CLASS="citetitle" +>http://www.ercipd.com/isv/edr_docs.htm</I +></A +>. + Note that these are <SPAN +CLASS="emphasis" +><I +CLASS="emphasis" +>not</I +></SPAN +> always correct, and + are certainly not complete. + </P +><P +> All ESCP/2 raster commands begin with the <TT +CLASS="literal" +>ESC</TT +> + character (0x1b), followed by either one or two command characters + and arguments where applicable. Older commands generally have one + command character. Newer commands usually have a + ‘<TT +CLASS="literal" +>(</TT +>’ (left parenthesis) followed by + a command character and a byte count for the arguments that + follow. The byte count is a 16-bit (2 byte) binary integer, in + little endian order. + </P +><P +> All arguments listed here are of the form + <TT +CLASS="literal" +>name[bytes]</TT +> where <TT +CLASS="literal" +>[bytes]</TT +> is + the number of bytes that comprise the argument. The arguments + themselves are usually one, two, or four byte integers, always + little endian (the least significant bits come first). Presumably + this is to match Intel processors. + </P +><P +> In some cases, the same command sequence identifies different + versions of the same command, depending upon the number of bytes + of arguments. + </P +><DIV +CLASS="sect1" +><H1 +CLASS="sect1" +><A +NAME="AEN477" +>5.1. Standard commands</A +></H1 +><P +></P +><DIV +CLASS="variablelist" +><P +><B +>ESC/P2 Commands</B +></P +><DL +><DT +><TT +CLASS="literal" +>ESC @</TT +></DT +><DD +><P +> Reset the printer. Discards any output, ejects the + existing page, returns all settings to their default. + Always use this before printing a page. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (G <CODE +CLASS="varname" +>BC</CODE +>=1 + <CODE +CLASS="varname" +>ON1</CODE +></TT +></DT +><DD +><P +> Turn on graphics mode. <CODE +CLASS="varname" +>ON</CODE +> should be + <CODE +CLASS="constant" +>1</CODE +> (turn on graphics mode). + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (U <CODE +CLASS="varname" +>BC</CODE +>=1 + <CODE +CLASS="varname" +>UNIT1</CODE +></TT +></DT +><DD +><P +> Set basic unit of measurement used by printer. This is + expressed in multiples of 1/3600". At 720 DPI, + <CODE +CLASS="varname" +>UNIT</CODE +> is <CODE +CLASS="constant" +>5</CODE +>; at + 360 DPI, <CODE +CLASS="varname" +>UNIT</CODE +> is + <CODE +CLASS="constant" +>10</CODE +>. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (U <CODE +CLASS="varname" +>BC</CODE +>=5 + <CODE +CLASS="varname" +>PAGEUNITS1</CODE +> <CODE +CLASS="varname" +>VUNIT1</CODE +> + <CODE +CLASS="varname" +>HUNIT1</CODE +> + <CODE +CLASS="varname" +>BASEUNIT2</CODE +></TT +></DT +><DD +><P +> Set basic units of measurement used by the printer. + <CODE +CLASS="varname" +>PAGEUNIT</CODE +> is the unit of page + measurement (for commands that set page dimensions and + the like). <CODE +CLASS="varname" +>VUNIT</CODE +> is the unit of + vertical measurement (for vertical movement commands). + <CODE +CLASS="varname" +>HUNIT</CODE +> is the unit of horizontal + movement (for horizontal positioning commands). All of + these units are expressed in + <CODE +CLASS="varname" +>BASEUNIT</CODE +>, which is in reciprocal + inches. Typically, <CODE +CLASS="varname" +>BASEUNIT</CODE +> is + <CODE +CLASS="constant" +>1440</CODE +>. In 720 DPI mode, + <CODE +CLASS="varname" +>PAGEUNIT</CODE +>, <CODE +CLASS="varname" +>VUNIT</CODE +>, + and <CODE +CLASS="varname" +>HUNIT</CODE +> are all + <CODE +CLASS="constant" +>2</CODE +>; in 1440×720 DPI mode, + <CODE +CLASS="varname" +>PAGEUNIT</CODE +> and <CODE +CLASS="varname" +>VUNIT</CODE +> + are normally set to <CODE +CLASS="constant" +>2</CODE +>; + <CODE +CLASS="varname" +>HUNIT</CODE +> is set to + <CODE +CLASS="constant" +>1</CODE +>. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (K <CODE +CLASS="varname" +>BC</CODE +>=2 + <CODE +CLASS="varname" +>ZERO1</CODE +> + <CODE +CLASS="varname" +>GRAYMODE1</CODE +></TT +></DT +><DD +><P +> Set color or grayscale mode, on printers supporting an + explicit grayscale mode. These printers can be + identified because they are advertised as having more + black nozzles than nozzles of individual colors. + Setting grayscale mode allows use of these extra nozzles + for faster printing. <CODE +CLASS="varname" +>GRAYMODE</CODE +> should + be <CODE +CLASS="constant" +>0</CODE +> or <CODE +CLASS="constant" +>2</CODE +> for + color, <CODE +CLASS="constant" +>1</CODE +> for grayscale. + <CODE +CLASS="varname" +>ZERO</CODE +> should always be + <CODE +CLASS="constant" +>0</CODE +>. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (i <CODE +CLASS="varname" +>BC</CODE +>=1 + <CODE +CLASS="varname" +>MICROWEAVE1</CODE +></TT +></DT +><DD +><P +> If <CODE +CLASS="varname" +>MICROWEAVE</CODE +> is + <CODE +CLASS="constant" +>1</CODE +>, use microweave mode. On older + printers, this is used to turn on microweave; on newer + printers, it prints one row at a time. All printers + support this mode. It should only be used at 720 (or + 1440×720) DPI. The Epson Stylus Pro series + indicates additional modes: + </P +><P +></P +><DIV +CLASS="variablelist" +><DL +><DT +><CODE +CLASS="constant" +>2</CODE +></DT +><DD +><P +> “Full-overlap” + </P +></DD +><DT +><CODE +CLASS="constant" +>3</CODE +></DT +><DD +><P +> “Four-pass” + </P +></DD +><DT +><CODE +CLASS="constant" +>4</CODE +></DT +><DD +><P +> “Full-overlap 2” + </P +></DD +></DL +></DIV +><P +> Any of these commands can be used with the high four + bits set to either <CODE +CLASS="constant" +>3</CODE +> or + <CODE +CLASS="constant" +>0</CODE +>. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC U + <CODE +CLASS="varname" +>DIRECTION1</CODE +></TT +></DT +><DD +><P +> If <CODE +CLASS="varname" +>DIRECTION</CODE +> is + <CODE +CLASS="constant" +>1</CODE +>, print unidirectionally; if + <CODE +CLASS="constant" +>0</CODE +>, print bidirectionally. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (s <CODE +CLASS="varname" +>BC</CODE +>=1 + <CODE +CLASS="varname" +>SPEED1</CODE +></TT +></DT +><DD +><P +> On some older printers, this controls the print head + speed. <CODE +CLASS="varname" +>SPEED</CODE +> of + <CODE +CLASS="constant" +>2</CODE +> is 10 inches/sec; + <CODE +CLASS="varname" +>SPEED</CODE +> of <CODE +CLASS="constant" +>0</CODE +> or 1 + is 20. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (e <CODE +CLASS="varname" +>BC</CODE +>=2 + <CODE +CLASS="varname" +>ZERO1</CODE +> + <CODE +CLASS="varname" +>DOTSIZE1</CODE +></TT +></DT +><DD +><P +> Choose print dotsize. <CODE +CLASS="varname" +>DOTSIZE</CODE +> can + take on various values, depending upon the printer. + Almost all printers support <CODE +CLASS="constant" +>0</CODE +> and + <CODE +CLASS="constant" +>2</CODE +>. Variable dot size printers + allow a value of <CODE +CLASS="varname" +>16</CODE +>. Other than the + value of <CODE +CLASS="varname" +>16</CODE +>, this appears to be + ignored at resolutions of 720 DPI and above. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (C <CODE +CLASS="varname" +>BC</CODE +>=2 + <CODE +CLASS="varname" +>PAGELENGTH2</CODE +></TT +>, <TT +CLASS="literal" +>ESC (C <CODE +CLASS="varname" +>BC</CODE +>=4 + <CODE +CLASS="varname" +>PAGELENGTH4</CODE +></TT +></DT +><DD +><P +> Set the length of the page in “pageunits” + (see <TT +CLASS="literal" +>ESC (U</TT +> above). The second form + of the command allows setting of longer page lengths on + new printers (these happen to be the printers that + support variable dot size). + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (c <CODE +CLASS="varname" +>BC</CODE +>=4 + <CODE +CLASS="varname" +>TOP2</CODE +> + <CODE +CLASS="varname" +>LENGTH2</CODE +></TT +>, <TT +CLASS="literal" +>ESC (c <CODE +CLASS="varname" +>BC</CODE +>=8 + <CODE +CLASS="varname" +>TOP4</CODE +> + <CODE +CLASS="varname" +>LENGTH4</CODE +></TT +></DT +><DD +><P +> Set the vertical page margins of the page in + “pageunits” (see <TT +CLASS="literal" +>ESC (U</TT +> + above). The margins are specified as the top of the + page and the length of the page. The second form of the + command allows setting of longer page lengths on new + printers (these happen to be the printers that support + variable dot size). + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (S <CODE +CLASS="varname" +>BC</CODE +>=8 + <CODE +CLASS="varname" +>WIDTH4</CODE +> + <CODE +CLASS="varname" +>LENGTH4</CODE +></TT +></DT +><DD +><P +> Set the width and length of the printed page region in + “pageunits” (see <TT +CLASS="literal" +>ESC (U</TT +> + above). + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (v <CODE +CLASS="varname" +>BC</CODE +>=2 + <CODE +CLASS="varname" +>ADVANCE2</CODE +></TT +>, <TT +CLASS="literal" +>ESC (v <CODE +CLASS="varname" +>BC</CODE +>=4 + <CODE +CLASS="varname" +>ADVANCE4</CODE +></TT +></DT +><DD +><P +> Feed vertically <CODE +CLASS="varname" +>ADVANCE</CODE +> + “vertical units” (see <TT +CLASS="literal" +>ESC + (U</TT +> above) from the current print head + position. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (V <CODE +CLASS="varname" +>BC</CODE +>=2 + <CODE +CLASS="varname" +>ADVANCE2</CODE +></TT +>, <TT +CLASS="literal" +>ESC (V <CODE +CLASS="varname" +>BC</CODE +>=4 + <CODE +CLASS="varname" +>ADVANCE4</CODE +></TT +></DT +><DD +><P +> Feed vertically <CODE +CLASS="varname" +>ADVANCE</CODE +> + “vertical units” (see <TT +CLASS="literal" +>ESC + (U</TT +> above) from the top margin. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC ($ <CODE +CLASS="varname" +>BC</CODE +>=4 + <CODE +CLASS="varname" +>OFFSET4</CODE +></TT +></DT +><DD +><P +> Set horizontal position to <CODE +CLASS="varname" +>OFFSET</CODE +> + from the left margin. This command operates on printers + of the 740 class and newer (all printers with variable + dot size). + </P +></DD +><DT +><TT +CLASS="literal" +>ESC $ + <CODE +CLASS="varname" +>OFFSET2</CODE +></TT +></DT +><DD +><P +> Set horizontal position to <CODE +CLASS="varname" +>OFFSET</CODE +> + from the left margin. This command operates on printers + of the 740 class and newer (all printers with variable + dot size). + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (\ <CODE +CLASS="varname" +>BC</CODE +>=4 + <CODE +CLASS="varname" +>UNITS2</CODE +> + <CODE +CLASS="varname" +>OFFSET2</CODE +></TT +></DT +><DD +><P +> Set horizontal position to <CODE +CLASS="varname" +>OFFSET</CODE +> + from the previous print head position, measured in + <CODE +CLASS="varname" +>UNITS</CODE +>. <CODE +CLASS="varname" +>UNITS</CODE +> is + measured in inverse inches, and should be set to 1440 in + all cases. This operates on all 1440 dpi printers that + do not support variable dot size. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (/ <CODE +CLASS="varname" +>BC</CODE +>=4 + <CODE +CLASS="varname" +>OFFSET4</CODE +></TT +></DT +><DD +><P +> Set horizontal position to <CODE +CLASS="varname" +>OFFSET</CODE +> + from the previous print head position, measured in + “horizontal units” (see <TT +CLASS="literal" +>ESC + (U</TT +> above). This operates on all variable dot + size printers. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC \ + <CODE +CLASS="varname" +>OFFSET2</CODE +></TT +></DT +><DD +><P +> Set horizontal position to <CODE +CLASS="varname" +>OFFSET</CODE +> + from the previous print head position, measured in basic + unit of measurement (see <TT +CLASS="literal" +>ESC (U</TT +> + above). This is used on all 720 dpi printers, and can + also be used on 1440 dpi printers in lower resolutions + to save a few bytes. Note that + <CODE +CLASS="varname" +>OFFSET</CODE +> may be negative. The range of + values for this command is between + <CODE +CLASS="constant" +>-16384</CODE +> and + <CODE +CLASS="constant" +>16383</CODE +>. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC r + <CODE +CLASS="varname" +>COLOR1</CODE +></TT +>, <TT +CLASS="literal" +>ESC (r <CODE +CLASS="varname" +>BC</CODE +>=2 + <CODE +CLASS="varname" +>DENSITY1</CODE +> + <CODE +CLASS="varname" +>COLOR1</CODE +></TT +></DT +><DD +><P +> Set the ink color. The first form is used on four-color + printers; the second on six-color printers. + <CODE +CLASS="varname" +>DENSITY</CODE +> is <CODE +CLASS="constant" +>0</CODE +> for + dark inks, <CODE +CLASS="constant" +>1</CODE +> for light. + <CODE +CLASS="varname" +>COLOR</CODE +> is + </P +><DIV +CLASS="table" +><A +NAME="AEN728" +></A +><P +><B +>Table 5-1. Colors</B +></P +><TABLE +BORDER="1" +CLASS="CALSTABLE" +><COL +WIDTH="1*" +TITLE="id"><COL +WIDTH="1*" +TITLE="color"><THEAD +><TR +><TH +><CODE +CLASS="varname" +>COLOR</CODE +></TH +><TH +>Color name</TH +></TR +></THEAD +><TBODY +><TR +><TD +><CODE +CLASS="constant" +>0</CODE +></TD +><TD +>Black</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>1</CODE +></TD +><TD +>Magenta</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>2</CODE +></TD +><TD +>Cyan</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>4</CODE +></TD +><TD +>Yellow</TD +></TR +></TBODY +></TABLE +></DIV +><P +> This command is not used on variable dot size printers + in softweave mode. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC . <CODE +CLASS="varname" +>COMPRESS1</CODE +> + <CODE +CLASS="varname" +>VSEP1</CODE +> <CODE +CLASS="varname" +>HSEP1</CODE +> + <CODE +CLASS="varname" +>LINES1</CODE +> <CODE +CLASS="varname" +>WIDTH2</CODE +> + data...</TT +></DT +><DD +><P +> Print data. <CODE +CLASS="varname" +>COMPRESS</CODE +> signifies the + compression mode. + </P +><DIV +CLASS="table" +><A +NAME="AEN767" +></A +><P +><B +>Table 5-2. Compression modes</B +></P +><TABLE +BORDER="1" +CLASS="CALSTABLE" +><COL +WIDTH="1*" +TITLE="id"><COL +WIDTH="1*" +TITLE="compression"><THEAD +><TR +><TH +><CODE +CLASS="varname" +>COMPRESS</CODE +></TH +><TH +>Compression mode</TH +></TR +></THEAD +><TBODY +><TR +><TD +><CODE +CLASS="constant" +>0</CODE +></TD +><TD +>No compression</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>1</CODE +></TD +><TD +> TIFF compression (incorrectly documented as + “run length encoded”) + </TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>2</CODE +></TD +><TD +> TIFF compression with a special command set. + </TD +></TR +></TBODY +></TABLE +></DIV +><P +> <CODE +CLASS="varname" +>VSEP</CODE +> depends upon resolution and + printer type. At 360 DPI, it is always + <CODE +CLASS="constant" +>10</CODE +>. At 720 DPI, it is normally + <CODE +CLASS="constant" +>5</CODE +>5. On the ESC 600, it is + <CODE +CLASS="constant" +>40</CODE +> (8 × 5}). On some other + printers, it varies. + </P +><P +> <CODE +CLASS="varname" +>HSEP1</CODE +> is <CODE +CLASS="constant" +>10</CODE +> at + 360 DPI and <CODE +CLASS="constant" +>5</CODE +> at 720 or 1440 DPI + (1440 DPI cannot be printed in one pass; it is printed + in two passes, with the dots separated in each pass by + 1/720"). + </P +><P +> <CODE +CLASS="varname" +>LINES</CODE +> is the number of lines to be + printed. It should be <CODE +CLASS="constant" +>1</CODE +> in + microweave and 360 DPI. At 720 DPI softweave, it should + be the number of lines to be actually printed. + </P +><P +> <CODE +CLASS="varname" +>WIDTH</CODE +> is the number of pixels to be + printed in each row. Following this command, a carriage + return (<CODE +CLASS="constant" +>13</CODE +> decimal, + <TT +CLASS="literal" +>0A</TT +> hex) should be output to return + the print head position to the left margin. + </P +><P +> The basic data format is a string of bytes, with data + from left to right on the page. Within each byte, the + highest bit is first. + </P +><P +> The TIFF compression is implemented as one count byte + followed by one or more data bytes. There are two + cases: + </P +><P +></P +><OL +TYPE="1" +><LI +><P +> If the count byte is <CODE +CLASS="constant" +>128</CODE +> or + less, it is followed by ([count] + 1) data bytes. + So if the count byte is <CODE +CLASS="constant" +>0</CODE +>, it + is followed by 1 data byte; if it is + <CODE +CLASS="constant" +>128</CODE +>, it is followed by 129 data + bytes. + </P +></LI +><LI +><P +> If the count byte is greater than 128, it is + followed by one byte. This byte is repeated (257 - + [count]) times. So if [count] is 129, the next byte + is treated as though it were repeated 128 times; if + [count] is 255, it is treated as though it were + repeated twice. + </P +></LI +></OL +></DD +><DT +><TT +CLASS="literal" +>ESC i <CODE +CLASS="varname" +>COLOR1</CODE +> + <CODE +CLASS="varname" +>COMPRESS1</CODE +> <CODE +CLASS="varname" +>BITS1</CODE +> + <CODE +CLASS="varname" +>BYTES2</CODE +> <CODE +CLASS="varname" +>LINES2</CODE +> + data...</TT +></DT +><DD +><P +> Print data in the newer printers (that support variable + dot size), and Stylus Pro models. + <CODE +CLASS="varname" +>COLOR</CODE +> is the color. + </P +><DIV +CLASS="table" +><A +NAME="AEN827" +></A +><P +><B +>Table 5-3. Extended Colors</B +></P +><TABLE +BORDER="1" +CLASS="CALSTABLE" +><COL +WIDTH="1*" +TITLE="id"><COL +WIDTH="1*" +TITLE="color"><THEAD +><TR +><TH +><CODE +CLASS="varname" +>COLOR</CODE +></TH +><TH +>Color name</TH +></TR +></THEAD +><TBODY +><TR +><TD +><CODE +CLASS="constant" +>0</CODE +></TD +><TD +>Black</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>1</CODE +></TD +><TD +>Magenta</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>2</CODE +></TD +><TD +>Cyan</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>4</CODE +></TD +><TD +>Yellow</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>5</CODE +></TD +><TD +>Alternate black (Stylus C70/C80)</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>6</CODE +></TD +><TD +>Alternate black (Stylus C70/C80)</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>16</CODE +></TD +><TD +>Gray (“light black”)</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>17</CODE +></TD +><TD +>Light magenta</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>18</CODE +></TD +><TD +>Light cyan</TD +></TR +></TBODY +></TABLE +></DIV +><P +> <CODE +CLASS="varname" +>COMPRESS</CODE +> signifies the compression + mode: + </P +><DIV +CLASS="table" +><A +NAME="AEN876" +></A +><P +><B +>Table 5-4. Compression modes</B +></P +><TABLE +BORDER="1" +CLASS="CALSTABLE" +><COL +WIDTH="1*" +TITLE="id"><COL +WIDTH="1*" +TITLE="compression"><THEAD +><TR +><TH +><CODE +CLASS="varname" +>COMPRESS</CODE +></TH +><TH +>Compression mode</TH +></TR +></THEAD +><TBODY +><TR +><TD +><CODE +CLASS="constant" +>0</CODE +></TD +><TD +>No compression</TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>1</CODE +></TD +><TD +> TIFF compression (incorrectly documented as + “run length encoded”) + </TD +></TR +><TR +><TD +><CODE +CLASS="constant" +>2</CODE +></TD +><TD +> TIFF compression with a special command set, or + “run length encoding 2” on some + printers. + </TD +></TR +></TBODY +></TABLE +></DIV +><P +> <CODE +CLASS="varname" +>BITS</CODE +> is the number of bits per pixel. + </P +><P +> <CODE +CLASS="varname" +>BYTES</CODE +> is the number of bytes wide for + each row (ceiling(BITS × width_of_row, 8)}). Note + that this is different from the <TT +CLASS="literal" +>ESC .</TT +> + command above. + </P +><P +> <CODE +CLASS="varname" +>LINES</CODE +> is the number of lines to be + printed. This command is the only way to get variable + dot size printing. In variable dot mode, the size of + the dots increases as the value (<CODE +CLASS="constant" +>1</CODE +>, + <CODE +CLASS="constant" +>2</CODE +>, or <CODE +CLASS="constant" +>3</CODE +>) + increases. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (D <CODE +CLASS="varname" +>BC</CODE +>=4 + <CODE +CLASS="varname" +>BASE2</CODE +> <CODE +CLASS="varname" +>VERTICAL1</CODE +> + <CODE +CLASS="varname" +>HORIZONTAL1</CODE +></TT +></DT +><DD +><P +> Set printer horizontal and vertical spacing. It only + applies to variable dot size printers in softweave mode + (and possibly other high end printers). + </P +><P +> <CODE +CLASS="varname" +>BASE</CODE +> is the base unit for this + command; it must be <CODE +CLASS="constant" +>14400</CODE +>. + </P +><P +> <CODE +CLASS="varname" +>VERTICAL</CODE +> is the distance in these + units between printed rows; it should be + ((separation_in_nozzles × <CODE +CLASS="varname" +>BASE</CODE +> + ÷ 720). + </P +><P +> <CODE +CLASS="varname" +>HORIZONTAL</CODE +> is the horizontal + separation between dots in a row. Depending upon the + printer, this should be either (14400 ÷ 720) or + (14400 ÷ 360). The Stylus Pro 9000 manual + suggests that the settings should match the chosen + resolution, but that is apparently not the case (or not + always the case) on other printers. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC (R <CODE +CLASS="varname" +>BC</CODE +>=8 00 R E M O T E + 1</TT +></DT +><DD +><P +> Enters “remote mode”. This is a special, + undocumented command set that is used to set up various + printer options, such as paper feed tray, and perform + utility functions such as head cleaning and alignment. + It does not appear that anything here is actually + required to make the printer print. Our best + understanding of what is in a remote command sequence is + described in a separate section below. + </P +></DD +><DT +><TT +CLASS="literal" +>ESC 01 @EJL [sp] ID\r\n</TT +></DT +><DD +><P +> Return the printer ID. This is considered a remote mode + command, although the syntax is that of a conventional + command. This returns the following information: + </P +><DIV +CLASS="informalexample" +><P +></P +><A +NAME="AEN937" +></A +><PRE +CLASS="screen" +>@EJL ID\r +MFG:EPSON; +CMD:ESCPL2,BDC; +MDL:[printer model]; +CLS:PRINTER; +DES:EPSON [printer model]; +\f</PRE +><P +></P +></DIV +><P +> After all data has been sent, a form feed byte should be + sent. + </P +></DD +></DL +></DIV +><P +> All newer Epson printers (STC 440, STP 750) require the + following command to be sent at least once to enable printing + at all. This command specifically takes the printer out of the + 1284.4 packet mode communication protocol and enables normal + data transfer. Sending it multiple times is is not harmful, so + it is normally sent at the beginning of each job: + </P +><DIV +CLASS="informalexample" +><P +></P +><A +NAME="AEN941" +></A +><PRE +CLASS="screen" +>ESC 01@EJL[space]1284.4[newline]@EJL[space][space][space][space] +[space][newline]ESC@</PRE +><P +></P +></DIV +><P +> The proper sequence of initialization commands is: + </P +><DIV +CLASS="informalexample" +><P +></P +><A +NAME="AEN944" +></A +><PRE +CLASS="screen" +>magic command +ESC @ +remote mode if needed +ESC (G +ESC (U +ESC (K (if appropriate) +ESC (i +ESC U (if needed) +ESC (s (if appropriate) +ESC (e +ESC (C +ESC (c +ESC (S +ESC (D (if needed) +ESC (V (optional -- this can be accomplished with ESC (v)</PRE +><P +></P +></DIV +><P +> For printing, the proper sequence is: + </P +><DIV +CLASS="informalexample" +><P +></P +><A +NAME="AEN947" +></A +><PRE +CLASS="screen" +>ESC (v</PRE +><P +></P +></DIV +><P +> and repeat for each color: + </P +><DIV +CLASS="informalexample" +><P +></P +><A +NAME="AEN950" +></A +><PRE +CLASS="screen" +>ESC ($ or ESC (\ or ESC \ +ESC (r or ESC r (if needed---not used with "ESC i" and not needed if the color +has not changed from the previous printed line) +ESC . or ESC i ...data... [return] (0A hex)</PRE +><P +></P +></DIV +><P +> To terminate a page: + </P +><DIV +CLASS="informalexample" +><P +></P +><A +NAME="AEN953" +></A +><PRE +CLASS="screen" +>[formfeed] (0C hex) +ESC @</PRE +><P +></P +></DIV +></DIV +></DIV +><DIV +CLASS="NAVFOOTER" +><HR +ALIGN="LEFT" +WIDTH="100%"><TABLE +SUMMARY="Footer navigation table" +WIDTH="100%" +BORDER="0" +CELLPADDING="0" +CELLSPACING="0" +><TR +><TD +WIDTH="33%" +ALIGN="left" +VALIGN="top" +><A +HREF="x271.html" +ACCESSKEY="P" +>Prev</A +></TD +><TD +WIDTH="34%" +ALIGN="center" +VALIGN="top" +><A +HREF="index.html" +ACCESSKEY="H" +>Home</A +></TD +><TD +WIDTH="33%" +ALIGN="right" +VALIGN="top" +><A +HREF="x955.html" +ACCESSKEY="N" +>Next</A +></TD +></TR +><TR +><TD +WIDTH="33%" +ALIGN="left" +VALIGN="top" +>The driver file</TD +><TD +WIDTH="34%" +ALIGN="center" +VALIGN="top" +> </TD +><TD +WIDTH="33%" +ALIGN="right" +VALIGN="top" +>Remote Mode Commands</TD +></TR +></TABLE +></DIV +></BODY +></HTML +>
\ No newline at end of file |