HP 48S/SX/G/GX HP-PCL Printer Driver Library


(c) Copyright Hewlett-Packard Company, 1992. 

Overview

The PCLPRINT library enables you to print a graphics object on a PCL printer, such as the HP ThinkJet, HP DeskJet, and HP LaserJet printers. When attached to the HOME directory, the library is named HPPRT. (An |HPPRT| menu label is visible in the LIBRARY menu). Two commands in the library, HPON and MAG, add an extra sublist of parameters as the fifth element in the HP 48 reserved variable PRTPAR. These parameters store information needed by your HP 48 to print graphics objects to the PCL printer. In order of occurrence in the sublist, the parameters are as follows:

      The real number 0, which indicates PCL printer type. 
      A real number, which represents the magnification. This is controlled by the MAG command and has a default setting of 2, which tells the library to expand each pixel in the graphics object to a 2x2 square on the printer.
      A string containing the escape sequence sent before a graphics object is printed. The default begin sequence is "<esc>*r0A", which tells the printer to start printing raster graphics at the left margin. The only way to change this is to edit PRTPAR.
      A string containing the escape sequence sent after a graphics object is printed. The default end sequence is "<esc>*rB<cr><lf>," which tells the printer to end raster graphics and execute a carriage-return and linefeed. The only way to change this is to edit PRTPAR.

Installation

      Transfer the PCLPRINT.LIB file from the computer to your calculator. The menu label |PCLPR| will appear in your HP 48 VAR menu.
      Attach the library to your HOME directory:
            Press the VAR menu label |PCLPR| to recall the library to the stack.
            Enter the port number where you want the library to reside.
            Execute STO.
            Turn the HP 48 off and then on again. |HPPRT| attaches itself and appears as a library in the LIBRARY menu.
            Purge the original copy of PCLPR in the VAR menu.

Operation

Here are the steps to follow to print an HP 48 graphics object on a PCL printer:

   1.Using the serial cable 25-pin adapter and a male-male gender converter (not included), connect the HP 48 to the PCL printer.
   2.Set the HP 48 baud (using the I/O SETUP menu) and the printer baud to match each other. Set the printer to use XON/XOFF handshaking.
   3.Execute HPON (press [RS]-[LIBRARY] |HPPRT| |HPON|).
   4.Optionally execute MAG and DPI. (See descriptions of these commands below.)
   5.Execute one of the HP 48 print commands for printing graphics objects-- PRLCD, PR1, or PRVAR. ([ON]-[PRINT] does not work and should be avoided.)
   6.If you wish to switch back to printing on the HP 82240 Infrared Printer, execute HPOFF (press [RS]-[LIBRARY] |HPPRT| |HPOFF|).

Command Summary

These commands are contained in the PCL library:

HPON
      Enables special graphics printing and adds the previously explained sublist to PRTPAR. Also sets flag -34 and clears flag -33 so that printing is directed to the wired serial port, and modifies IOPAR to enable transmit pacing (XON/XOFF) and to set parity to "none."
HPOFF 
      Disables special graphics printing and clears flag -34 (so that printing will be directed to an HP 82240B printer). HPOFF does not change the sublist in PRTPAR--the magnification setting and other changes are preserved for the next time you execute HPON.
MAG 
      Takes a real number from level 1 and puts it in the magnification position in the sublist in PRTPAR. A magnification of N causes one pixel in the graphics object to be expanded to an NxN square on the printer. (MAG 0 effectively disables printing.)
DPI 
      Takes a real number from level one and sends an escape sequence to set the printer to that number of dots per inch. This command only works for the HP DeskJet and HP LaserJet printers.

Special Note For The HP LaserJet Printer

Since the HP LaserJet printer won't print until it gets a whole page of data, you need to send a formfeed character (character number 12) to print a graphics object of less than one page. You can do this by putting a string containing a formfeed character in level 1 and executing PR1. (You can also edit the sublist in PRTPAR so that the end-sequence string contains a formfeed. This would cause each graphics object to be printed on its own page.)

The Library Object

Use this link to download the library: PCLPRINT.LIB.

Note: This is a binary object.

(c) Copyright Hewlett-Packard Company, 1992.