Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Pbmtoescp2 User Manual</TITLE></HEAD>
<BODY>
<H1>pbmtoescp2</H1>
Updated: 14 July 2015
<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>{<b>180</b>|<b>360</b>|<b>720</b>}]
[<b>-stripeheight=</b><i>n</i>]
[<b>-formfeed</b>]
[<b>-raw</b>]
[<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>.

<p>The printed output has one pixel for each pixel of the input image, except
that it is padded up to the stripe size (see <b>-stripeheight</b> option)
vertically and to a multiple of 8 columns horizontally.  Before Netpbm 10.72
(September 2015), the output is instead truncated to those boundaries.


<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>, <b>360</b>, and <b>720</b>.  See <a href="#hints">hints</a> for
more information on this.

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

<p>Before Netpbm 10.72 (September 2015), <b>720</b> is not valid.

</dd>

<dt><b>-stripeheight=</b><i>n</i>

<dd>This option controls the height in lines of the stripes in the output.

<p>The valid stripe heights in the printer language are 1, 8, and 24, but
it is capable of expressing any height up to 255 and <b>pbmtoescp2</b>
accepts any value in the range 1-255.  It issues a warning, though, if you
choose something other than 1, 8, or 24.

<p>The default is 24.

<p>This option was new in Netpbm 10.72 (September 2015).  Before that, the
stripe size is always 24.

<dt><b>-formfeed</b>

<dd>This option causes <b>pbmtoescp2</b> to place a formfeed command at the
end of the output.

<p>This option was new in Netpbm 10.72 (September 2015).


<dt><b>-raw</b>

<dd>This option causes <b>pbmtoescp2</b> to generate only the data blocks.
It does not generate printer commands to set up the output (for example,
setting the line spacing).

<p>You can use this to insert graphics into a larger printer command stream.

<p>This option was new in Netpbm 10.72 (September 2015).

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