As always (or usual) you are right.
Since Canon says they support PCL and PJL I found that they
do BUT not exactly as HP developed it.
With Canon I actually had to use two PJL COMMENT commands to
get the stapler to work.
Where as with the HP printer we just used the HP PJL to turn
on the stapler.
I guess the Canon developers had some extra time to waste so
they do it differently rather then make there printers 100%
PCL and PJL compatible.
Anyways, I got it to work and thanks for you information
From: Scott Klement [mailto:rpg400-l@xxxxxxxxxxxxxxxx]
Sent: Tuesday, August 26, 2008 12:41 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: How to turn on staple feature with RPG pgm
The controls for stapling and hole punching are not not
different PJL commands for different printers.
Furthermore, it's often important to control WHERE the PJL
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
prior to the control sequences that start any of the pages.
being that the printer needs to know ahead of time that the
follow will be grouped together and stapled.
Personally, I prefer to use a user-defined transform program
IBM's TSPRWPR) since that lets me control the escape
sequences for the
whole document. Otherwise, HPT will insert the page-level
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
(unless you go *USERASCII -- but that's usually too much
Plus, if I use a USRTFMPGM I don't have to change any of my
code to insert control sequences into the spooled files --
control sequences are inserted when the spooled file is
not when it's generated.
Also, I haven't worked with Canon printers -- but with some
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
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
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
the correct PJL or PCL sequences are to enable stapling.
(Or, if you
can't get docs, try printing with a Windows driver and
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
I cannot find any information using Google or Canon web
in regards to the commands
To send to activate stapler,
Anyone know anything about this or can point me to some