Michael and John (and anybody else!),

Sending an AFP overlay to a non-IPDS printer using host-print-transform
(HPT) causes the overlay to be converted and sent for EACH page! To get
around that overhead, I converted the overlay to a PCL macro which could be
loaded onto the printer. I then modified my print program to send a PCL
command to "activate" that macro as an overlay. It was quite the learning
experience (3 steps forward, 2 steps back!), but I'll try to summarize what
I did.

One question - can you print to your HP4100 (or other laser printer)
directly from your PC?

1) Create your overlay on a PC.

I used Microsoft Word and imported the signature as a graphic file, but I
also had success experimenting with Microsoft Paint.

2) Print overlay to a file.

Keep your HP4100 as the selected printer, but click on the "Print to file"
checkbox in the print dialog. That will send all of the PCL commands, text,
etc. to a file that you specify.

3) Edit the file.

Here is where it gets interesting! You'll need a text editor that can
operate in hex-mode since you will be dealing with non-printable characters.
I use UltraEdit (www.ultraedit.com) but there are a bunch of options out
there. One important thing is that any nulls (hex 00) in the file be left
alone. For example, if you switch to text mode in Ultra-Edit, any null
characters get converted to spaces. It looks the same on the screen, but
plays havoc with graphics (don't ask how I know this!!).

Look for <esc>E (hex 1B 45). That is the PCL command for a printer reset. It
should be close to the beginning, perhaps after some @PJL commands. Delete
everything up to, but not including, the <esc>E. Now, look for <ff> (hex
0C). That is the character for top-of-form. It should be at the end, perhaps
before some @PJL commands. Delete that character and everything else that

Insert the following after the <esc>E at the beginning of the file.

        <esc>&f999y0x0S (hex 1B 26 66 39 39 39 79 30 78 30 53)

This executes the following PCL commands
        Macro ID # 999
        Start macro definition
        Push print position

Insert the following at the end of the file.

        <esc>&f1s1x10X  (hex 1B 26 66 31 73 31 78 31 30 58)

This executes the following PCL commands
        Pop print position
        Stop macro definition
        Make macro permanent

4) Send the file to your printer. You'll need a utility that sends the file
directly without inserting any printer control codes. There are several
"RawPrint" utilities out there (check google). I found one that runs from a
command line, but don't remember where I picked it up from.

5) Modify your print program.

You need to send the following text to the printer before you start printing
your actual documents.

        <esc>&f999y4X   (hex 1B 26 66 39 39 39 79 34 58)

This executes the following PCL commands
        Macro ID # 999
        Use macro as an overlay (i.e. print it on every page)

The macro should remain resident in your printer. It will probably be
cleared if you turn the printer off, so you'll need to resend the file. I
have my client send the macro to the printer prior to printing their
documents just to make sure it is in place. I also created another PCL file
to remove the macro from the printer for some additional security. That file
consists of the following text.

        <esc>E<esc>&f999y5x6X   (hex 1B 45 1B 26 66 39 39 39 79 35 78 36 58)

This executes the following PCL commands
        Reset printer
        Macro ID # 999
        Disable overlay
        Delete macro

FYI - Check out
http://printers.necsam.com/public/printers/pclcodes/pcl5hp.htm for a great
reference to PCL codes.

Hope this helps!
Richard Casey

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.