| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN"> |
| 2 |
<html><head><title>Pbmtoescp2 User Manual</title></head> |
| 3 |
<body> |
| 4 |
<h1>pbmtoescp2</h1> |
| 5 |
Updated: 14 July 2015 |
| 6 |
<br> |
| 7 |
<a href="#index">Table Of Contents</a> |
| 8 |
|
| 9 |
<h2>NAME</h2> |
| 10 |
|
| 11 |
pbmtoescp2 - convert a PBM image to a ESC/P2 printer file |
| 12 |
|
| 13 |
<h2 id="synopsis">SYNOPSIS</h2> |
| 14 |
|
| 15 |
<b>pbmtoescp2</b> |
| 16 |
|
| 17 |
[<b>-compress=</b><i>compressionmode</i>] |
| 18 |
[<b>-resolution=</b>{<b>180</b>|<b>360</b>|<b>720</b>}] |
| 19 |
[<b>-stripeheight=</b><i>n</i>] |
| 20 |
[<b>-formfeed</b>] |
| 21 |
[<b>-raw</b>] |
| 22 |
[<i>pbmfile</i>] |
| 23 |
|
| 24 |
<p>All options can be abbreviated to their shortest unique prefix. You |
| 25 |
may use two hyphens instead of one to designate an option. You may |
| 26 |
use either white space or equals signs between an option name and its |
| 27 |
value. |
| 28 |
|
| 29 |
<h2 id="description">DESCRIPTION</h2> |
| 30 |
|
| 31 |
<p>This program is part of <a href="index.html">Netpbm</a>. |
| 32 |
|
| 33 |
<p><b>pbmtoescp2</b> reads a PBM image as input. It produces an ESC/P2 |
| 34 |
raster graphic printer control stream as output. |
| 35 |
|
| 36 |
<p> This program creates an output that is printable on Epson printers that |
| 37 |
understand the ESC/P2 printer control language (e.g. the Stylus models). For |
| 38 |
older Epson 9-pin dot matrix printers, which use the ESC/P protocol, see |
| 39 |
<b>pbmtoepson</b>. |
| 40 |
|
| 41 |
<p>The printed output has one pixel for each pixel of the input image, except |
| 42 |
that it is padded up to the stripe size (see <b>-stripeheight</b> option) |
| 43 |
vertically and to a multiple of 8 columns horizontally. Before Netpbm 10.72 |
| 44 |
(September 2015), the output is instead truncated to those boundaries. |
| 45 |
|
| 46 |
<p>Input is read from file <i>pbmfile</i> if specified, otherwise from |
| 47 |
stdin. Output is written to stdout. |
| 48 |
|
| 49 |
<h2 id="options">OPTIONS</h2> |
| 50 |
|
| 51 |
<p>In addition to the options common to all programs based on libnetpbm |
| 52 |
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions"> |
| 53 |
Common Options</a>), <b>pbmtoescp2</b> recognizes the following |
| 54 |
command line options: |
| 55 |
|
| 56 |
<dl compact> |
| 57 |
|
| 58 |
<dt><b>-compress=</b><i>compressionmode</i> |
| 59 |
|
| 60 |
<dd>This determines the compression mode that <b>pbmtoescp2</b> uses |
| 61 |
in its output. Valid values for <i>compressionmode</i> are <b>0</b> |
| 62 |
and <b>1</b>. <b>-compress=0</b> results in a printer control stream |
| 63 |
with uncompressed raster graphic data. <b>-compress=1</b> results in |
| 64 |
a printer control stream with RLE compressed raster graphic data |
| 65 |
(RLE means Run Length Encoding). The default is <b>-compress=1</b>. |
| 66 |
</dd> |
| 67 |
|
| 68 |
<dt><b>-resolution=</b><i>dpi</i></dt> |
| 69 |
|
| 70 |
<dd>This determines the horizontal and the vertical print resolution |
| 71 |
set in the printer control stream. Another way of looking at it is a |
| 72 |
declaration of what the resolution of the input image is (PBM images |
| 73 |
don't have inherent resolution). Valid values for <i>dpi</i> are |
| 74 |
<b>180</b>, <b>360</b>, and <b>720</b>. See <a href="#hints">hints</a> for |
| 75 |
more information on this. |
| 76 |
|
| 77 |
<p>The default is <b>-resolution=360</b>. |
| 78 |
|
| 79 |
<p>Before Netpbm 10.72 (September 2015), <b>720</b> is not valid. |
| 80 |
|
| 81 |
</dd> |
| 82 |
|
| 83 |
<dt><b>-stripeheight=</b><i>n</i> |
| 84 |
|
| 85 |
<dd>This option controls the height in lines of the stripes in the output. |
| 86 |
|
| 87 |
<p>The valid stripe heights in the printer language are 1, 8, and 24, but |
| 88 |
it is capable of expressing any height up to 255 and <b>pbmtoescp2</b> |
| 89 |
accepts any value in the range 1-255. It issues a warning, though, if you |
| 90 |
choose something other than 1, 8, or 24. |
| 91 |
|
| 92 |
<p>The default is 24. |
| 93 |
|
| 94 |
<p>This option was new in Netpbm 10.72 (September 2015). Before that, the |
| 95 |
stripe size is always 24. |
| 96 |
|
| 97 |
<dt><b>-formfeed</b> |
| 98 |
|
| 99 |
<dd>This option causes <b>pbmtoescp2</b> to place a formfeed command at the |
| 100 |
end of the output. |
| 101 |
|
| 102 |
<p>This option was new in Netpbm 10.72 (September 2015). |
| 103 |
|
| 104 |
|
| 105 |
<dt><b>-raw</b> |
| 106 |
|
| 107 |
<dd>This option causes <b>pbmtoescp2</b> to generate only the data blocks. |
| 108 |
It does not generate printer commands to set up the output (for example, |
| 109 |
setting the line spacing). |
| 110 |
|
| 111 |
<p>You can use this to insert graphics into a larger printer command stream. |
| 112 |
|
| 113 |
<p>This option was new in Netpbm 10.72 (September 2015). |
| 114 |
|
| 115 |
</dl> |
| 116 |
|
| 117 |
<h2 id="hints">HINTS</h2> |
| 118 |
|
| 119 |
<p>RLE compresses very well bitmaps of line drawings, preferably horizontal |
| 120 |
oriented contents like texts, sheets of music, etc. However, bitmaps derived |
| 121 |
from photographs are not ideal for RLE. In extreme cases, when no byte |
| 122 |
repetitions occur in the input, the result will be even slightly bigger than |
| 123 |
the input. To avoid this, use compression mode 0 to switch off RLE. |
| 124 |
|
| 125 |
<p>Each pixel in the input PBM image becomes one dot in the printed output. |
| 126 |
Therefore, you must make sure the width and height of the input are |
| 127 |
appropriate for the print resolution you choose and the print area you want. |
| 128 |
E.g. if you print at 180 dpi and want the image to print as 8 inches by 10, |
| 129 |
you must supply a PBM that is 1440 pixels wide by 1800 pixels high. You can |
| 130 |
adjust the size of the input |
| 131 |
with <b>pamscale</b>, <b>pamstretch</b>, <b>pbmreduce</b>, or |
| 132 |
<b>pamenlarge</b>. |
| 133 |
|
| 134 |
|
| 135 |
<h2 id="seealso">SEE ALSO</h2> |
| 136 |
|
| 137 |
<b><a href="escp2topbm.html">escp2topbm</a></b>, |
| 138 |
<b><a href="pbmtoepson.html">pbmtoepson</a></b>, |
| 139 |
<b><a href="pamscale.html">pamscale</a></b>, |
| 140 |
<b><a href="pamstretch.html">pamstretch</a></b>, |
| 141 |
<b><a href="pbmreduce.html">pbmreduce</a></b>, |
| 142 |
<b><a href="pamenlarge.html">pamenlarge</a></b>, |
| 143 |
<b><a href="pbm.html">pbm</a></b> |
| 144 |
|
| 145 |
<h2 id="author">AUTHOR</h2> |
| 146 |
|
| 147 |
<p>Copyright (C) 2003 by Ulrich Walcher (<a |
| 148 |
href="mailto:[email protected]">[email protected]</a>). |
| 149 |
|
| 150 |
<h2 id="history">HISTORY</h2> |
| 151 |
|
| 152 |
<p><b>pbmtoescp2</b> was added to Netpbm in Release 10.18 (August 2003); |
| 153 |
it was created around the same time. |
| 154 |
|
| 155 |
<hr> |
| 156 |
<h2 id="index">Table Of Contents</h2> |
| 157 |
<ul> |
| 158 |
<li><a href="#synopsis">SYNOPSIS</a> |
| 159 |
<li><a href="#description">DESCRIPTION</a> |
| 160 |
<li><a href="#options">OPTIONS</a> |
| 161 |
<li><a href="#hints">HINTS</a> |
| 162 |
<li><a href="#seealso">SEE ALSO</a> |
| 163 |
<li><a href="#author">AUTHOR</a> |
| 164 |
<li><a href="#history">HISTORY</a> |
| 165 |
</ul> |
| 166 |
</body> |
| 167 |
</html> |
| 168 |
|