Making Laser Printer Overlays

Jim Asman jlasman at telus.net
Thu Aug 16 08:52:07 PDT 2007


--------------- Original Message ---------------
At 09:30A Thu Aug 16 2007, Mike Schwartz wrote:

> Howie [howiewz at beonthenet.com]Said:
> 
> >A number of people have expressed interest in the MSDOS freeware Make
> Overlay program that I mentioned.
> 
> >Here is a link to download it:
> http://www.photobuff.com/attachments/mkovl.zip
> 
> > It converts files that you generate using an HP laser printer and a "print
> to disk" operation into printer overlay files.
> 
>     A customer has asked me if I could change some info on their letterheads
> and then make new laser printer overlays for them.  I'm just starting to dig
> into this.  I have Jim Asman's mkpcl program, and I found some emails from
> Howie and others from several years ago that explain how to make and use
> overlays.  I have used Jim's code to create PCL images, but I've never
> converted them to overlays.
> 
>     A quick web search located some other tools, such as:
> http://www.hamil.org/pcl/ but everything I could find either was an old DOS
> tool or required compiling "C" code on a Unix system.  
> 
>      Maybe these old DOS EXE's will work OK, and I suppose I could find a
> Unix box where I could compile Kevin Smith's "C" code, but before I go
> through a lot of work, I would appreciate any suggestions I could get from
> those of you who create laser overlays on a regular basis.  (I am starting
> to understand what needs to be done, but I want to make sure I'm not
> overlooking any tools that could make this job a lot easier to do.)
> 
>      Apparently the guy who created the original letterheads made about a
> dozen of forms that are loaded as different macros in the printers.  I was
> hoping there was some kind of visual tool that would easily allow me to
> manage all the macros/forms inside a laser printer (typically HP 4200's).

First, let's clarify what an overlay IS. There is no such thing as an
overlay format or whatever. An overlay is simply one way that a PCL macro
can be implemented. More correctly called an "automatic overlay", when
the appropriate PCL command is given, the printer will automatically run
the named macro on every page AFTER your data has been imaged and just
before the page is ejected from the printer. Timing is important, because
pcl code can erase as well as print, so any erasing done in an overlay
will clobber what might have been imaged by your fp data. I could tell you
stories...

Once the macro has been enabled for overlay, the printer will run it on
every page until you tell it to stop. If you only want the letterhead
on the first page, then you would disable the overlay on subsequent pages.

If all you were printing was a logo, use a command with mkpcl like...

               mkpcl -x 100 -y 200 -m 50 -p logo.bmp logo.pcl

This will create a permanent macro with an ID of 50 in the file logo.pcl.

Put the code to download the logo.pcl file in the form init on the
output. Then in a variable on the output format put...

                  aa(8,*)=chr("27") { "&f50y4X"

Then you will get the logo on every page. You could have loaded many
macros beforehand, and then based on the current record data, enable
the appropriate overlay. For an overlay, you must imbed the x,y position
to locate the image inside the macro; otherwise it will be at 0,0.
Each macro must have a unique ID number, in this case 50.

To disable the overlay...
                    
                     aa=chr("27") { "&f5X"

You would put that code on the first page where you didn't want the
overlay printed.

Obviously, a macro can contain more can contain more than a logo.

Personally, I just use vim to bang PCL code into a file until I have
what I want. You can certainly scan a form and make a PCL macro from
the scan, but that makes a BIG macro file and editing is problematic.

There was a piece of software from Visual Software in England called
"forms electric", about $100 as I recall, that would trim a .prn
file created in windows down to a pcl macro.

I have tried different forms packages in windows, and I always go back
to vim and do it by hand. Generally, I find visual forms software tedious
if you are tightly fitting text and linework together as you would expect
on a typical business form.

I would suggest that you start out simple and build on it from there.
You can get pretty good with shell scripts to generate repetitive code
right from within vim.



Jim 
--
jlasman at telus.net                      Spectra Colour Services Ltd.
Jim Asman                              10221 144a Street            
Phone: (604)584-0977                   Surrey, BC  V3R 3P7   CANADA            
 Cell: (604)619-0977                   www.spectracolorservices.com



More information about the Filepro-list mailing list