summary refs log tree commit diff
path: root/pbmtoescp2.html
blob: 06cc5c8d403cf2c6a0c8563f682e32c64a8aa99a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Pbmtoescp2 User Manual</TITLE></HEAD>
<BODY>
<H1>pbmtoescp2</H1>
Updated: 4 April 2005
<BR>
<A HREF="#index">Table Of Contents</A>

<H2>NAME</H2>

pbmtoescp2 - convert a PBM image to a ESC/P2 printer file

<H2 id="synopsis">SYNOPSIS</H2>

<B>pbmtoescp2</B>

[<B>-compress=</B><I>compressionmode</I>]
[<B>-resolution=</B><I>dpi</I>]
[<I>pbmfile</I>]

<P>All options can be abbreviated to their shortest unique prefix.  You
may use two hyphens instead of one to designate an option.  You may
use either white space or equals signs between an option name and its
value.

<H2 id="description">DESCRIPTION</H2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p><b>pbmtoescp2</b> reads a PBM image as input.  It produces an ESC/P2
raster graphic printer control stream as output.

<P> This program creates an output that is printable on Epson printers that
understand the ESC/P2 printer control language (e.g. the Stylus models).  For
older Epson 9-pin dot matrix printers, which use the ESC/P protocol, see
<B>pbmtoepson</B>.

<H2 id="options">OPTIONS</H2>

<P>Input is read from file <I>pbmfile</I> if specified, otherwise from
stdin. Output is written to stdout.

<dl COMPACT>

<dt><b>-compress=</b><i>compressionmode</i>

<dd>This determines the compression mode that <b>pbmtoescp2</b> uses
in its output.  Valid values for <I>compressionmode</I> are <b>0</b>
and <b>1</b>.  <b>-compress=0</B> results in a printer control stream
with uncompressed raster graphic data.  <b>-compress=1</b> results in
a printer control stream with RLE compressed raster graphic data
(RLE means Run Length Encoding).  The default is <b>-compress=1</b>.
</dd>

<dt><b>-resolution=</b><i>dpi</i></dt>

<dd>This determines the horizontal and the vertical print resolution
set in the printer control stream.  Another way of looking at it is a
declaration of what the resolution of the input image is (PBM images
don't have inherent resolution).  Valid values for <i>dpi</i> are
<b>180</b> and <b>360</b>.  See <a href="#hints">hints</a> for more
information on this.

<p>The default is <b>-resolution=360</b>.


</dd>

</dl>

<H2 id="hints">HINTS</H2>

<P>RLE compresses very well bitmaps of line drawings, preferably
horizontal oriented contents like texts, sheets of music, etc.
However, bitmaps derived from photographs are not ideal for RLE.  In
extreme cases, when no byte repetitions occur in the input, the result
will be even slightly bigger than the input.  To avoid this, use
compression mode 0 to switch off RLE.

<p>Each pixel in the input PBM image becomes one dot in the printed
output.  Therefore, you must make sure the width and height of the
input are appropriate for the print resolution you choose and the
print area you want.  E.g. if you print at 180 dpi and want the image
to print as 8 inches by 10, you must supply a PBM that is 1440
pixels wide by 1800 pixels high.  You can adjust the size of the
input with <b>pamscale</b>, <b>pamstretch</b>, <b>pbmreduce</b>, or
<b>pamenlarge</b>.


<H2 id="seealso">SEE ALSO</H2>

<B><A HREF="escp2topbm.html">escp2topbm</A></B>,
<B><A HREF="pbmtoepson.html">pbmtoepson</A></B>,
<B><A HREF="pamscale.html">pamscale</A></B>,
<B><A HREF="pamstretch.html">pamstretch</A></B>,
<B><A HREF="pbmreduce.html">pbmreduce</A></B>,
<B><A HREF="pamenlarge.html">pamenlarge</A></B>,
<B><A HREF="pbm.html">pbm</A></B>

<H2 id="author">AUTHOR</H2>

<P>Copyright (C) 2003 by Ulrich Walcher (<A
HREF="mailto:u.walcher@gmx.de">u.walcher@gmx.de</A>).

<H2 id="history">HISTORY</H2>

<p><b>pbmtoescp2</b> was added to Netpbm in Release 10.18 (August 2003);
it was created around the same time.

<HR>
<A NAME="index">&nbsp;</A>
<H2>Table Of Contents</H2>
<UL>
<LI><A HREF="#synopsis">SYNOPSIS</A>
<LI><A HREF="#description">DESCRIPTION</A>
<LI><A HREF="#options">OPTIONS</A>
<LI><A HREF="#hints">HINTS</A>
<LI><A HREF="#seealso">SEE ALSO</A>
<LI><A HREF="#author">AUTHOR</A>
<LI><A HREF="#history">HISTORY</A>
</UL>
</BODY>
</HTML>