Contact Us
Visual Software: Saving money by reducing printing!
  • Home
  • Pcl2pdf
    • Evaluations
    • What's New?
    • User Guide
    • Licences
  • Help
  • Store
  • Contact

Forms Electric

10/4/2015

 
Use your preferred Windows applications to create Hewlett-Packard (PCL) forms overlay macros, complete with TrueType fonts and graphics.

Forms Electric is a Windows PC based product comprising of two command line utilities. These let you create LaserJet PCL forms overlay macros on your PC from documents created in Windows based applications, such as Word, and wrap up the macros as spool files for transfer to host systems, perhaps using binary FTP or terminal emulation. The macros can be downloaded to host attached printers as regular binary PCL print files.

To get your printers to merge these forms with your report data you need to insert or include simple PCL commands near the start of your documents. For example the PCL command <esc>&f1y4X will tell a LaserJet compatible printer to merge form id 1 with the rest of the document. Here <esc> is ASCII 27, the escape character. This command should be inserted on the first page that needs to use the form and after any printer reset, page orientation or size commands. There's more information on these commands in the Forms Electric User Guide.

Creating PCL Forms Overlay at the "DOS" Command Prompt

You can use the Forms Electric command line utilities on Windows XP or (32-bit) Windows 7, 8 to create the OVL and FNT files. With these command line utilities you would need to print your form document to FILE from Word using the HP LaserJet PCL5 printer driver. A standard LaserJet III or 4 driver should do. Let's say you've printed to test.prn. Then at a "DOS" command prompt you would then run the Pcl2mac utility to generate the form contents:

C> Pcl2mac test.prn

This example creates the macro file test.ovl (and possibly also a soft font file test.fnt). You then run the Forms Electric Download utility to assign a PCL macro id (identifying number, eg. 1):

C> Download test.ovl /i:1 /o:test.mac


(Note that Pcl2mac and Download are 16 bit DOS applications so you must use "short" 8.3 style filenames. Test.prn, the input PCL print file to Pcl2mac must be less than 500KB in size.)
Test.mac should then contain all you need and you can download it to your printer using:

C> copy /b test.mac LPT1

or

C> copy /b test.mac \\yourservername\yourprintershare

32 / 64-bit Compatibility

Download.exe and Pcl2mac.exe will both run on 32-bit Windows systems (including Windows 7, 8) but not 64-bit. You can use PCL output from 64-bit HP LaserJet PCL5 drivers, perhaps from a different PC or server. If you are using 64-bit Windows 7 Professional or Ultimate you can install Windows XP Mode. This installs an XP compatible sub-system within which many programs can be run. Please note this can be a complicated and time consuming process to set up and get running.

Colour Forms Overlay Macros

You can only use colour HP LaserJet PCL5C commands in overlay macros provided that you do not use HP-GL/2 vector graphics also. This is due to firmware limitations in the HP Color LaserJet printers, not due to Forms Electric. PCL5C has problems using colour commands and HP-GL/2 graphics in overlay macros at the same time. Unfortunately most Windows Color LaserJet printer drivers output HP-GL/2 so it is not possible to use these drivers with Forms Electric to create colour macros.

Pcl2pdf Runtime Forms Support

10/4/2015

 
The main Forms Electric product page has a section headed Creating PCL Forms Overlay at the "DOS" Command Prompt that discusses creating LaserJet PCL forms overlay macros using the command line utilities. These enable you to create PCL form files on disk with macro ids assigned.

Currently Pcl2pdf includes support for basic HP-GL/2 vector graphics commands only. For best results when creating macros using Forms Electric ensure first that the Windows LaserJet PCL printer driver's Graphics setting is set to raster and not vector. You can change this setting by following the steps detailed at Optimising Windows LaserJet PCL printer settings for Pcl2pdf Check this setting if your forms do not appear or are missing information when converting using Pcl2pdf.

Let's assume you have built a PCL forms macro file called form.pcl. This would contain the main overlay macro form.ovl assigned with macro id 1 as well as any soft fonts required by the macro that may be in form.fnt. You can use any reasonable macro id from 0 to 32767. The laser printers themselves use macro ids to distinguish between the different macros held in the printer's RAM memory. This is the only way they can tell them apart and use them. If you want to use a second macro, perhaps for the cover page only, then create a second overlay file and assign it a different macro id:

C> download cover.ovl /i:2 /o:cover.pcl

You can now build the complete PCL preload file for Pcl2pdf using the DOS copy command:

C> copy /b form.pcl+cover.pcl macros.pcl

Take care not to omit the /b switch. This is essential to ensure all the data is copied into the final preload file. You can now use the preload file at runtime when converting PCL print files to PDF with Pcl2pdf:

C> pcl2pdf32 test.pcl test.pdf -load:macros.pcl -f:1 -fc:2

Notice how the macro ids passed using -f and -fc match those specified in the Forms Electric Download commands.
Please see the Pcl2pdf User Guide section Pcl2pdf Runtime Forms Merging for further details on the switches available for preloading and merging PCL forms overlay macros.

Optimising Windows LaserJet PCL printer settings for Pcl2pdf

10/4/2015

 
If you are trying to use Pcl2pdf to convert Windows print files generated by LaserJet PCL printer drivers then there are a few tips here which may help. First, use a standard LaserJet III or 4 printer driver if possible. We've also had feedback that the straight LaserJet 5 driver can work well.

The default Windows LaserJet PCL printer drivers are written and provided by Microsoft. Hewlett-Packard do write their own for the LaserJet 4, 5, 6, 4000, 5000 and 8000 range of printers and often these provide more printer specific functionality and better PCL code output.

You can download HP's own Windows NT PCL drivers from LaserJet PCL 5e Drivers for HP LaserJet 4, 5, and 6 Series Printers and Microsoft Windows NT 4.0 Also check out the Hewlett-Packard main web site for new updates.
Windows 7, 8 and later

We recommend disabling the HP-GL/2 "vector" graphics output from your printer driver. You can do this by altering your Windows printer driver's configuration as detailed here. Use Windows Control Panel, open the Printers folder and right click on the printer driver required. Which method works best will then depend on what options your driver offers:-
Try selecting Printing Preferences... and then the button Advanced... There could be several options to try though not all obvious. Look for the Document Options section. Try disabling either of Advanced Printing Features or Print Optimizations.

Or try the settings from the attached screen grab for the driver's Advanced Options (from Printing Preferences). Set TrueType font to Substitute... and disable Print Optimizations.

HP LaserJet Advanced Options
Older Windows

The screen displays shown below illustrate how you can also reconfigure your driver to give optimal output for Pcl2pdf. You may find that your driver has its screens laid out differently but look around for similar options. To get to these screen use Window's Start/Settings/Printer menu option, right-click on the PCL printer driver and choose Properties. On Windows NT you may instead have to double-click on the driver to open it and then select Printer/Document Defaults.

a) Setup the driver to use raster graphics and not HP-GL/2 vector graphics
b) Setup the driver to download TrueType fonts and bitmap soft fonts, not scalable

Graphics Mode
Graphics

Capturing PCL data output from Windows LaserJet printer drivers

10/4/2015

 
Pcl2pdf doesn't offer port capturing but you may be able to configure your Windows PCL printer driver to output to FILE and capture the data this way. An alternative option might be to use Virtual Port Monitor from Alphatronics, Inc. Please note that we cannot recommend or endorse this product however.

Using PCL macros with Unix and other non-PC systems

10/4/2015

 
Let's suppose you created a document in Word and then used Forms Electric in Create mode to save the overlay as TEST. You will then have on disk an overlay file TEST.OVL and possibly a soft font file TEST.FNT. To use this overlay from a Unix or AS/400 system you must now use the supplied DOS Download utility to "wrap" the macro and assign it a PCL macro id. (This is so the printer can identify and track it in it's memory.) So, to give it the id 1 use:

C> download test /i:1 /o:test.prt

You now have a spool file TEST.PRT which contains the font file and overlay together topped and tailed with the PCL commands to assign the macro the id 1. This file you can upload to your Unix or AS/400 system to store and download from there.

To get the overlay into your printer from your server you can probably use the Unix lp command. As this file can contain raw binary data be sure to use the lp options to spool the file without carriage-return or form feed translation, ie. in raw mode. On some Unix systems you can use lp -oraw test.prt etc. Spooling the overlay this way will download it to your printer's memory where it will remain dormant until your application calls it.

Your Unix application will need to send a PCL command to the printer at the start of its job to instruct the printer to merge this overlay with the application data. The most common command to use is <esc>&f1y4X Be sure to get the lower and upper- case syntax correct. Here <esc> is ASCII 27 the escape character and the 1 is the macro id to correspond that we used in the Download command line. You can put this command anywhere on the first page of data you want the form to be used.

A PCL printer reset command <esc>E at the end of the job (after the last form feed) will turn off the merging but leave the overlay in the printer's memory. This step is optional.

    Author

    Neil Geddes

    Archives

    April 2015

    Categories

    All

    RSS Feed

Visual Software

This web site is © Copyright 1993-2021 Visual Software
The Visual Software logo is a trademark of Visual Software

Proudly powered by Weebly