Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Starbase Device Drivers Manual - Vol2: HP 9000 Series 700 Computers > Chapter 4 Printer Command Language Imaging Formatter

Printer Configurations

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

There are two fundamental printer configurations of interest, spooled and non-spooled. The primary difference between the two configurations is that spooling uses the system spooler (lp) in the raw (-oraw option) mode. This section gives an overview of these configurations, so you can choose the appropriate method for your application.

Non-Spooled Operation

The only non-spooled operation currently supported by the PCL Imaging Formatter is direct access printing in the HP-UX environment. Direct access printing involves a non-shared printer directly connected to the host system. The standard output (stdout) from the HP-UX commands pcltrans and screenpr is "piped" to the printers special device file (see the section on "Setting Up the Special Device File" in this chapter). You will need to have write permission for the special file.

The HP-UX environment can be obtained from within a program using the procedure system (described in HP-UX Reference, Section 3).

Direct Access Printing

The following direct access printing examples are written in C.

  • Using a bitmap file from a Starbase program[25]:

    /*Create the starbase bitmap file */
    bitmap_to_file(params ... ,myprint.bit, ... params);
    /*Process the file in color and send to the printer */
    system("pcltrans -I myprint.bit > 〈dev〉/rlp");
  • Print currently displayed bitmap from a program in color:

    system("screenpr -I > 〈dev〉/rlp");
  • Print currently displayed window from a program in color:

    /*Origin=10,10, Width=100, Height=200 */
    system("screenpr -I -X10 -Y10 -D100 -H200 > 〈dev〉/rlp");
  • Print color bitmap file using ordered dither in an HP-UX environment:

    pcltrans -I -a3 myprint.bit > 〈dev〉/rlp
  • Print currently displayed bitmap in grayscale, rotated:

    screenpr -I -a5 -R > 〈dev〉/rlp

Spooled Operation

Spooled operation is the best mode if you have a shared printer. The HP-UX commands pcltrans and screenpr can also be utilized in a spooled environment (see the Starbase Reference manual for details on pcltrans and screenpr).

pcltrans

is used as a filter to process a Starbase bitmap file previously created by the bitmap_to_file procedure. Standard out (stdout) is then piped to the lp spooler in raw mode. Spooling can be done locally, or the pcltrans command output can be piped into a file and sent to a remote printer on another computer.

screenpr

is used to process a currently displayed bitmap. Its output is also sent to stdout and can be piped to either the lp spooler or a file for remote printing.

Spooled Printing

The following spooled printing examples are written in C.

  • Using a bitmap file from a Starbase program:

    /* Create the starbase bitmap file */
    bitmap_to_file(params ... ,myprint.bit, ... params);
    /* Process the file in color and send to the printer */
    system("pcltrans -I myprint.bit | lp -oraw");
  • Print currently displayed bitmap from a program in color:

    system("screenpr -I | lp -oraw");
  • Print currently displayed window from a program in color:

    /* Origin=10,10, Width=100, Height=200 */
    system("screenpr -I -X10 -Y10 -D100 -H200 | lp -oraw");
  • Print color bitmap file using ordered dither in an HP-UX environment:

    pcltrans -I -a3 myprint.bit > myprint.out
    lp -oraw myprint.out

    or

    cat myprint.bit | pcltrans -I -a3 | lp -oraw
  • Print currently displayed bitmap in grayscale, rotated:

    screenpr -I -a5 -R | lp -oraw

Spooler Conflicts

In the following scenarios, interleaved/unusable output may be produced.

  • Direct access output mode is used for a printer which is currently used for spooling via the lp command.

  • More than one person is using direct access printing mode on the same device.

In general, if a device is configured for spooling with the lp command, all graphics output should be done using the spooling print mode. Only use non-spooled (direct access) print mode when a device is not shared. Simultaneous usage of spooled and non-spooled modes should be avoided.

Software Structure

The following files are used for color/monochromatic printing on printers that support the imaging extensions of PCL:

pcltrans

screenpr


[25] The actual path names of directories in angle brackets depend on the file system structure. See the Graphics Administration Guide for details.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.