about summary refs log tree commit diff
path: root/pbmtoescp2.html
blob: 3bdc0d54ef1259220b063eb7bb8c9da43ff8b261 (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
125
126
127
128
129
130
131
132
133
134
<!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>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

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

<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<B>pbmtoescp2</B>

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

<A NAME="lbAD">&nbsp;</A>
<H2>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 <a
href="http://www.epson.co.uk/support/manuals/pdf/ESCP/Part_1.pdf">ESC/P2
printer control language</a> (e.g. the Stylus models).  For older
Epson 9-pin dot matrix printers, which use the ESC/P protocol, see
<B>pbmtoepson</B>.

<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>

<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.

<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>.


<A NAME="lbAG">&nbsp;</A>
<H2>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>

<A NAME="lbAH">&nbsp;</A>
<H2>AUTHOR</H2>

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

<A NAME="history">&nbsp;</A>
<H2>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="#lbAB">NAME</A>
<LI><A HREF="#lbAC">SYNOPSIS</A>
<LI><A HREF="#lbAD">DESCRIPTION</A>
<LI><A HREF="#lbAE">OPTIONS</A>
<LI><A HREF="#hints">HINTS</A>
<LI><A HREF="#lbAG">SEE ALSO</A>
<LI><A HREF="#lbAH">AUTHOR</A>
<LI><A HREF="#history">HISTORY</A>
</UL>
</BODY>
</HTML>