Thanks Scott,
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
John
-----Original Message-----
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
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
documentation?
Thanks
John
As an Amazon Associate we earn from qualifying purchases.