Previous IDL Reference Guide: IDL Direct Graphics Devices Next

The PCL Device

Device Keywords Accepted by the PCL Device:

CLOSE_FILE, COLOR, FILENAME, FLOYD, INCHES, LANDSCAPE, OPTIMIZE, ORDERED, PIXELS, PORTRAIT, RESOLUTION, SET_CHARACTER_SIZE, SET_COLORMAP, THRESHOLD, XOFFSET, XSIZE, YOFFSET, YSIZE

PCL (Printer Control Language) is used by Hewlett-Packard laser and ink jet printers to produce graphics output. To direct graphics output to a PCL file, issue the command:

SET_PLOT,'PCL'  

This causes IDL to use the PCL driver for producing graphical output. Once the PCL driver is enabled via SET_PLOT, the DEVICE procedure is used to control its actions, as described below. The default settings for the PCL driver are listed in the following table:

 

Table A-15: Default PCL Driver Settings 

Table A-15: Default PCL Driver Settings 
Feature
Value
File
idl.pcl
Mode
Portrait
Optimization level
0 (None)
Dither method
Floyd-Steinberg
Resolution
300 dpi
Horizontal offset
1/2 in.
Vertical offset
1 in.
Width
7 in.
Height
5 in.

The PCL device draws into a memory buffer of the specified size (or the default size, if the XSIZE and YSIZE keywords to DEVICE are not specified). Anything drawn outside this buffer will be silently discarded.


Note
Unlike monitors where white is the most visible color, PCL writes black on white paper. Setting the output color index to 0, the default when PCL output is selected, writes in black. A color index of 255 writes white which is invisible on white paper.

Color tables are not used with PCL unless the color mode has been enabled using the COLOR keyword to the DEVICE procedure. For images, color dithering produces realistic color image output even though PCL printers only produce eight output colors. In most cases, simply choosing an appropriate color table (using LOADCT or XLOADCT), or creating a color table from an image (via TVLCT) will work fine. If you need finer control over the colors used, see the SET_COLORMAP keyword for additional information. For vector graphics, only eight colors are supported—no line dithering is implemented. Any RGB component that is not zero is treated as 255. The correct RGB definitions for each color are shown in the following table. Use the HELP, /DEVICE command to view the current options for PCL output.

Table A-16: PCL RGB Color Definitions

Table A-16: PCL RGB Color Definitions
Color
Red Value
Green Value
Blue Value
Red
255
0
0
Green
0
255
0
Blue
0
0
255
Cyan
0
255
255
Magenta
255
0
255
Yellow
255
255
0
Black
0
0
0
White
255
255
255


Note
The values of XSIZE and YSIZE for this device are effectively limited to a maximum of 11 inches due to the size of the memory map employed to render the graphics information.

  IDL Online Help (March 06, 2007)