screenpr(1G)
NAME
screenpr − capture the screen raster information and translate into PCL and/or RTL raster graphics format
SYNOPSIS
screenpr [ options ]
DESCRIPTION
The command screenpr captures screen raster data and translates the bitmap into Printer Command Language (PCL) and/or Raster Transfer Language (RTL) raster graphics format. screenpr will use either Starbase or the X Window System to read the information from the graphics device, then transparently pass this information to the pcltrans utility. Therefore, options to screenpr consist of those appropriate for both screenpr and pcltrans. Since final output is to standard out, screenpr should be used as a filter with its output redirected to a file or to some other process such as the lp spooler.
ACCESS MODES
screenpr operates in one of two access modes, depending upon whether the screen bitmap data is read by Starbase or the X Window System.
The X Window System access mode is the screenpr default for the following graphics devices:
CRX-48Z
HCRX family of graphics devices
internal graphics display on the following systems:
all 712’s, 715/64, 715/80, 715/100
In the X Window System access mode, both overlay and image plane bitmap data are processed. This access mode correctly handles multiple windows with different depths, visuals, and/or colormaps. The -W command line option may be used to force screenpr to use the X Window System access mode for displays which normally default to the Starbase access mode (see the list below). However, the X Window System access mode should not be used with the PersonalVRX or TurboVRX graphics devices, as errors and/or unexpected outputs may occur.
The Starbase access mode is the screenpr default for the following graphics devices:
CRX (8-plane system)
CRX-24/CRX-24Z
PersonalVRX
TurboVRX
internal graphics display on the following systems:
all 705’s, all 710’s
715/33, 715/50, 715/75, 725/50, 725/75
In the Starbase access mode, only the image planes are processed; any image in the overlay planes is ignored. Due to the way in which Starbase reads the image plane bitmap data, it is recommended that only a single graphics window at a time be captured with screenpr when in the Starbase access mode. Capturing multiple windows may result in an incorrect output image, especially if these windows use double-buffering and/or different colormaps, visuals, and/or window depths. To bypass this limitation on capturing multiple windows and/or the overlay planes, some devices which by default use the Starbase access mode (such as the CRX family of graphics devices and some internal graphics displays) may also use the X Window System access method by specifying the -W command line option. However, the -W option should not be used for the PersonalVRX and TurboVRX graphics displays.
COMMAND LINE ARGUMENTS
Output from screenpr is transparently piped to the pcltrans formatter. However, the screenpr command parses options for both screenpr and pcltrans, transparently passing those options unique to pcltrans to the pcltrans process. Therefore, this section only describes the command line arguments unique to screenpr. Detailed information on those command line arguments appropriate for pcltrans may be obtained by consulting the pcltrans documentation.
Access Mode Specification:
By default, screenpr will use either the Starbase access mode or the X Window System access mode depending upon the type of graphics device on the user’s system. Refer to the previous section on "Access Modes" for more information on these options.
−Fdevfile
Use this option to specify the device file from which screenpr reads the screen bitmap data (valid only when screenpr uses Starbase access mode). The default device file is /dev/crt. This option should be used if the graphics display’s default device file is other than /dev/crt, or if multiple displays are present.
−Wdisplay
Use this option to specify the graphics display from which screenpr reads the screen bitmap data. This option also forces screenpr to use the X Window System access mode, independent of the graphics device connected to the user’s system. If this option is not explicitly specified and screenpr is operating in the X Window System access mode, then screenpr will use the environment variable $DISPLAY for determining which display will be captured. Note that specifying this option is the only means by which the screen image from an X Station can be captured by screenpr.
Image Selection:
The following four options allow a user to select a portion of the entire screen. If a single window is desired, use xwininfo or other utility to determine the geometry of that window, then specify this geometry as options to screenpr.
−Dpixels
Width of the original image in pixels. The default width is the entire screen.
−Hpixels
Height of the original image in pixels. The default height is the entire screen.
−Xpixels
Offset of the source image from the screen’s left boundary. The default offset is 0.
−Ypixels
Offset of the source image from the screen’s top boundary. The default offset is 0.
RUN COMMANDS (rc) FILE
screenpr will also optionally accept command line options specified from a run commands file. This file may contain options for screenpr and/or pcltrans. Before processing the command line arguments, screenpr looks for a run command file as follows:
1. If there is a file in the current working directory named .screenprrc, then read and process its contents.
2. Otherwise if there is a file in the user’s home directory named .screenprrc, then read and process its contents.
3. Otherwise read and process the file /usr/lib/starbase/formatters/pcl/screenprrc, which comes with the Starbase product. This file has reasonable defaults that should not alter screenpr’s behavior from previous releases.
The rc file contents essentially have the same format as the command line options. Each line of the rc file should be:
1. A comment line: either a line with a "#" in the first column, or a line consisting of all blanks.
2. An option, with appropriate arguments, exactly as it would be given on the command line.
Command line arguments override those specified in the rc file.
NOTE: Command line options will not override certain option settings in the rc file, namely −I, −c, −C, −R, −s, −P, −k, −q, and −T.
EXAMPLES
All examples shown here assume that output can be directed to the target output device via the lp spooler. A hypothetical printer destination has also been provided for each example.
A typical example is to capture the screen for output to a Color LaserJet. The entire screen image is captured from the default graphics device or display using the default access mode. No command options unique to screenpr are used; only the pcltrans option to set the imaging mode has been specified (-I). The output is piped to the lp spooler.
screenpr -I | lp -oraw -dcolorlj
Another example is to capture the screen for output to a PaintJet XL300. For screenpr command options, the pixel offset and width/height are specified (-D, -H, -X, -Y) to capture one-quarter of the screen (a 640x512 pixel rectangle taken from the center of a 1280x1024 display). The default access mode for the graphics device is used. Command options transparently passed to pcltrans include setting the imaging mode (-I) and setting a gamma value (-g). The output is piped to the lp spooler.
screenpr -D640 -H512 -X320 -Y256 -I -g1.1 | lp -oraw -dxl300
Another example is to capture the screen from a CRX-24 using the X Window System access mode, for monochrome output to a LaserJet 4Plus. Specifying the -W option overrides the default Starbase access mode for the CRX-24. A full screen image from the graphics display myhpsys:0.0 is captured. Command options transparently passed to pcltrans include specifying host-based image processing mode (-C), and a monochrome error diffusion image rendering algorithm (-a). The output is piped to the lp spooler.
screenpr -Wmyhpsys:0.0 -C -a6 | lp -oraw -dlj4p
SEE ALSO
Starbase Reference: bitmap_to_file(3G), bitmapfile(4G), pcltrans(1G).
Starbase Graphics Techniques: "Storing, Retrieving, and Printing Images".
Starbase Device Drivers Manual: "PCL Formatter", "PCL Imaging Formatter".
HP-UX Reference: lp(1M).
Hewlett-Packard Company — HP-UX Release 10.0: November 1994