Hi John,

The controls for stapling and hole punching are not not standardized -- different PJL commands for different printers.

Furthermore, it's often important to control WHERE the PJL commands appear in the stream. In the case of stapling, you sometimes need to make sure the staple command is sent at the start of a spooled file, prior to the control sequences that start any of the pages. The reason being that the printer needs to know ahead of time that the pages that follow will be grouped together and stapled.

Personally, I prefer to use a user-defined transform program (based on IBM's TSPRWPR) since that lets me control the escape sequences for the whole document. Otherwise, HPT will insert the page-level control sequences for me, and consider my programs' data to be part of the pages -- and I don't have the opportunity to change the control sequences (unless you go *USERASCII -- but that's usually too much trouble).

Plus, if I use a USRTFMPGM I don't have to change any of my existing code to insert control sequences into the spooled files -- since the control sequences are inserted when the spooled file is transformed, and not when it's generated.

Also, I haven't worked with Canon printers -- but with some Ricoh models, I've found that there are certain PCL codes that reset the hole punching options (they may reset stapling as well, I can't remember). I think they were the page orientation codes? But my memory is fuzzy. So my transform program searches for those PCL commands and removes them if punching is turned on -- that way, the punching still works.

In my experience it takes a lot of trial and error to figure out why punching/stapling isn't working, because you have to find the PCL codes that are causing the problem :)

But the starting point is to get the documentation that explains what the correct PJL or PCL sequences are to enable stapling. (Or, if you can't get docs, try printing with a Windows driver and sniffing the network connection.) Then try inserting the PJL -- and take it from there.

John Allen wrote:
I have used the staple feature on an HP4220 from within an
RPG program by sending PJL commands in the spooled file.

I tried the exact same sequence for a Canon ImageRunner 5000
without success.

I cannot find any information using Google or Canon web site
in regards to the commands

To send to activate stapler,

Anyone know anything about this or can point me to some



This thread ...


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

This mailing list archive is Copyright 1997-2020 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].