phs-to-escp2

Convert .phs output for an Epson ESC/P2 printer

Syntax:

phs-to-escp2 [-A] [-B size] [-b size] [-C]
             [-c colors] [-D debug_fname] [-d]
             [-h height] [-M model] [-m model]
             [-n name] [-ocn] [-oD n] [-odn] [-of]
             [-oh] [-oin] [-omn] [-opn] [-oQn]
             [-oq] [-orn] [-oSX,Y] [-oyn] [-P file]
             [-p start[,end]] [-pr] [-s level]
             [-U  filename]
             [-V] [-w width] [-x offset] [-y offset]
             filename

Runs on:

Neutrino

Options:

-A
Force anti-aliasing of fonts.
-B size
Specify the size of the printer buffer in bytes. This buffer is used if the specified input file is a FIFO.
-b size
Specify the size of the printer buffer, in bytes.
-C
Disable the compression of output data.
-c colors
The number of colors available; a value of 1 indicates 256 colors, and a value of 3 indicates 16 million colors.
-D debug_fname
Send debug information to the specified file.
-d
Delete the input file after processing.
-h height
Specify the initial height of the source image. The default is 480 pixels.
-M model
Select the model by specifying the QNX model ID, which is a hexadecimal integer:
Model ID
MODEL_COLOR 0x101
MODEL_Pro 0x201
MODEL_ProXL 0x202
MODEL_COLOR_IIs 0x203
MODEL_COLOR_II 0x204
MODEL_ProXL_Plus 0x301
STYLUS_COLOR_400 0x63C3C3D
STYLUS_COLOR_440 0x640FC3F
STYLUS_COLOR_500 0x63DFC6C
STYLUS_COLOR_600 0x63EFC9C
STYLUS_COLOR_640 0x6423C9E
STYLUS_COLOR_680 0x6463C9B (same printer as 777)
STYLUS_COLOR_740 0x643FCCF
STYLUS_COLOR_750 0x6446CCE
STYLUS_COLOR_777 0x646CE8E
STYLUS_COLOR_800 0x6403FFD
STYLUS_COLOR_820 0x6425FFC
STYLUS_COLOR_850 0x6456FFE
STYLUS_COLOR_870 0x6470FFF
STYLUS_COLOR_880 0x648FFFA
STYLUS_COLOR_900 0x641FFAC
STYLUS_COLOR_1160 0x63A69AF
STYLUS_COLOR_1200 0x63BC95C
STYLUS_COLOR_1270 0x63BF95E
STYLUS_COLOR_1500 0x63E08ED
STYLUS_COLOR_1520 0x63E68EC
STYLUS_COLOR_3000 0x63BB1FC

If model is less than 0x4000, it's assumed to be an old-style Epson model number (400, 500, 600. 800, ...).

The default is determined from the command name. For example, if invoked as Pp.escp2.600, the default model is 600.

-m model
Select the model by specifying the MicroSoft model ID, which is a string of up to 20 ASCII characters.
-n name
Specify the name of the printer.
-ocn
Adjust the cyan gamma correction for Floyd-Steinberg dithering. A negative value means less, positive means more.
-oDn
Specify the Ink Dot size.
-odn
Set printer graphical depletion (default: 2). Ranges between 0 (disabled) and 5 (remove every fifth pixel).
-of
Enable Floyd-Steinberg dithering (default: -oq).
-oh
Enable halftone dithering (default: -oq).
-oin
Adjust the intensity (10-49 is dark, 50 is normal, and 51-99 is light). The default is 50.
-omn
Adjust the magenta gamma correction for Floyd-Steinberg dithering. A negative value means less, positive means more.
-opn
Specify printing type. Choices are: 1 (B/W); 3 (CMY color); 4 (CMYK).
-oQn
Set the print quality (0 is draft, 1 is normal, 2 is high). The default is 1.
-oq
Use the QNX dithering method (default).
-orn
Set the resolution; the default is 360 DPI unless specified by the source file. Valid choices are 180, 360, and 720.
-oSX,Y
Scale the image in the X or Y dimension (e.g. -oS0.75,0.6). The scale value may be:
Negative
Scale as a multiple of the source image size. For example, use -oS-1,-1 to print the image at exactly its source size. Each pixel of the image will correspond to one printed dot on the page. The size of the printed image will vary depending on the printer resolution (DPI).
Positive
Scale as a multiple of the page size. For example, use -oS1,1 to print the image at the full page size. In this example, the image will be distorted if its aspect ratio (X:Y) is different from the page's width:height ratio.
0
Use the maximum size while respecting the aspect ratio of the source image. For example, -oS0,0.5 scales the image to half the height of the page and scales the width of the image proportionately.

If you set only the X scale factor, the Y scale factor is assumed to be the same value. For example, -oS0.5 sets both X and Y to 0.5, meaning the image will fill ¼ of the page.

-oyn
Adjust the yellow gamma correction for Floyd-Steinberg dithering. A negative value means less, positive means more.
-P file
The name of the Photon palette file to use. The default is default.pal.
-p start[,end]
Specify the starting (and optionally ending) page number to print. If start is greater than end, the pages are printed in reverse order.
-pr
Print the entire file in reverse order.
-s level
Specify the reporting level, where level is an integer.
-U filename
Delete this file when the print job is completed.
-V
Be verbose (-VV: be more verbose).
-w width
Specify the initial width of the source image. The default is 640 pixels.
-x offset
The initial x offset (default: 0).
-y offset
The initial y offset (default: 0).
filename
Name of a Photon draw-stream (*.phs) file.

Description:

This utility converts Photon draw-stream (.phs) output into a form that an Epson ESC/P2 printer understands. The configuration file for Epson ESC/P2 printers, /etc/printers/epson.cfg, specifies phs-to-escp2 as a filter for spooler to use.

The output is sent to stdout. Typically, this is redirected to a printer device, as shown in the example. This utility sends any error messages to slogger; use sloginfo to display them.

Examples:

phs-to-escp2 file.phs >/dev/par

See also:

phs-to-bjc, phs-to-bmp, phs-to-ijs, phs-to-pcl, phs-to-ps, spooler

Printing with spooler in the Printing chapter of the Neutrino User's Guide