Switching to PostScript on HP LaserJet IIISi

ID: Q95724

The information in this article applies to:

SUMMARY

To print from the Command window to a Hewlett-Packard (HP) LaserJet IIISi printer in PostScript mode when the printer's default setting is PCL mode, you must perform the procedure below before using the ? command.

MORE INFORMATION

Before running the code, make sure that the printer is configured for AUTO CONT=ON *. This can be accomplished from the printer's control panel as follows:

1. Press the ON LINE key to take the printer off line. The indicator light

   should turn off.

2. Hold the MENU key down for about 5 seconds. The message PCL CONFIG MENU
   should appear first, followed by SYS=HP-PCL *.

3. Repeatedly press the MENU key until AUTO CONT=OFF * appears. If it is
   already set to ON, skip to step 6.

4. Press the + key. AUTO-CONT=ON should appear.

5. Press the ENTER key to save your choice. AUTO CONT=ON * should appear.

6. Press the RESET key, then the ON LINE key.

The printer is now set for automatic switching from PCL mode to PostScript mode.

The following code must be run to automatically switch the printer from PCL mode to PostScript mode:

   SET TALK OFF
      ** talk is directed to the screen
   SET PDSETUP TO "postscript"
      ** loads the printer driver setup
   SET LIBRARY TO c:\foxpro2\goodies\pdrivers\psapi.plb
      ** specifies external library
   SET PRINTER TO
      ** specifies printer's default port
   SET PRINT ON
      ** enables printing

   x=set("pdset")
      ** initializes memory variable "x"
   SET PDSETUP TO
      ** unloads printer driver
   DO PS
      ** procedure call to switch printer
   ? pddocst(_plength, 128)
      ** loads PS code to start printing
   SET PDSETUP TO (x)
      ** loads driver to memory variable x"

   ? "this is a test of HPLJ IIISi PostScript"
      ** test sentence to print

   SET PDSETUP TO
      ** unloads printer driver
   ?pddocend()
      ** loads code to terminate print job
   DO PCL
      ** procedure call to switch printer back to PCL mode
   SET PRINT OFF
      ** disables output to the printer
   SET PRINTER TO
      ** sets printer port to default
   SET LIBRARY TO
      ** resets to default

   *** Procedure to send printer escape sequence to switch to
   *** PostScript

   PROCEDURE PS
   ??? CHR(27)+'%-12345X@PJL enter language=postscript'

   *** Procedure to send printer escape sequence to switch to PCL

   PROCEDURE PCL
   ??? CHR(27)+'%-12345X@PJL enter language=pcl'

   ***End of Program Code ***

When you are printing in PostScript mode, the left margin will occasionally need to be adjusted to enable the first few characters to print in full. Adjust the left margin in the PostScript printer driver setup dialog box by choosing Printer Setup from the File menu.

Additional reference words: FoxDos 2.00 2.50 2.50a Post Script III Si pdparms KBCategory: kbprint KBSubcategory:

Last Reviewed: April 17, 1995