programatically controlling the stapler
programatically controlling the stapler
(OP)
I'm trying to turn on the stapler for a print job and then reset it afterwards so future prints are not stapled.
I've spent months on this and need help.
Here's what I've got so far:
~%-12345X
@PJL SET OUTBIN=OPTIONALOUTBIN2
@PJL SET FINISH=STAPLE
@PJL SET STAPLEOPTION=ONEANGLED
@PJL ENTER LANGUAGE = PCL
~&l2A~&l1O
This is the report that I want to have stapled.
It could go on for several pages
bla bla bla
~%-12345X
@PJL SET OUTBIN=OPTIONALOUTBIN2
@PJL SET FINISH=NONE
@PJL SET STAPLEOPTION=NONE
~%-12345X~E
(Here, I'm showing ~ as the Escape character)
I'm using an HP M4555 MFP with the stapler option, and I've seen it work.
I get the report with just the text I expect (This is the report...), but with no staple, and it ends with the PJL code on the last page (where it has @PJL SET FINISH=NONE)
What am I doing wrong?
Thanks in advance!!
I've spent months on this and need help.
Here's what I've got so far:
~%-12345X
@PJL SET OUTBIN=OPTIONALOUTBIN2
@PJL SET FINISH=STAPLE
@PJL SET STAPLEOPTION=ONEANGLED
@PJL ENTER LANGUAGE = PCL
~&l2A~&l1O
This is the report that I want to have stapled.
It could go on for several pages
bla bla bla
~%-12345X
@PJL SET OUTBIN=OPTIONALOUTBIN2
@PJL SET FINISH=NONE
@PJL SET STAPLEOPTION=NONE
~%-12345X~E
(Here, I'm showing ~ as the Escape character)
I'm using an HP M4555 MFP with the stapler option, and I've seen it work.
I get the report with just the text I expect (This is the report...), but with no staple, and it ends with the PJL code on the last page (where it has @PJL SET FINISH=NONE)
What am I doing wrong?
Thanks in advance!!
RE: programatically controlling the stapler
{
Ec%-12345X@PJL SET COPIES = 3 <CR> <LF>
@PJL SET RET = MEDIUM <CR> <LF>
@PJL SET PAGEPROTECT = OFF <CR> <LF>
@PJL ENTER LANGUAGE = PCL<CR> <LF>
EcE. . . .pcl job data. . . . .EcE
Ec%-12345X
}
There is a specific warning that there can be only <LF> and optionally <CR>
between the leading
Ec%-12345X
and the first @PJL sequence.
Beware of trailing spaces in the first line after Ec%-12345X ; stuff like that has bitten me many times.
The reference does not mention the trailing -E after the closing
Ec%-12345X
sequence.
Perhaps that is a newer enhancement.
No specific expertise claimed here.
RE: programatically controlling the stapler
The UEL command at the beginning of the job must be immediately followed by the PJL command prefix (@PJL).
No other characters, including control characters, are allowed between the UEL command and the @PJL prefix.
So the LineFeed characters following the 'X' of each of the Universal Exit Language sequences are technically invalid.
The <Esc>E escape sequence following the terminating UEL is also superfluous.
I've no idea whether or not the SET commands shown are valid for the target printer.
RE: programatically controlling the stapler
~%-12345X@PJL SET OUTBIN=OPTIONALOUTBIN2
@PJL SET FINISH=STAPLE
@PJL SET STAPLEOPTION=ONEANGLED
@PJL ENTER LANGUAGE = PCL
&l2A~&s1C....report goes here....
~E
and the next report is not stapled by default.
Thank you so much!!
RE: programatically controlling the stapler
I used PCL to go Landscape (~&l1O) but no staple.
I then tried to use PJL instead, but setting:
@PJL SET ORIENTATION=LANDSCAPE
it prints Landscape, but won't staple.
Is there another option I need to change at the same time?
~%-12345X@PJL JOB
@PJL SET OUTBIN = OPTIONALOUTBIN3
@PJL SET FINISH = STAPLE
@PJL SET ORIENTATION=LANDSCAPE
@PJL SET STAPLEOPTION = ONEANGLED
@PJL ENTER LANGUAGE = PCL
&l2A~&s1C . . . report . . .
~E ~%-12345X@PJL EOJ
@PJL RESET
~%-12345X
RE: programatically controlling the stapler
@PJL SET STAPLEOPTION = ONE (instead of ONEANGLED)
it does staple, but puts it in the upper right corner instead of the left corner, and is still angled.
This is not a big problem, but wondered how to get it in the upper left.
Could you please point me to a PJL tech manual that has this stuff in it?
I found some on the internet that don't have these options (they were from the HPLJ 5SI era).
I'm very familiar with PCL, but PJL is new to me.
RE: programatically controlling the stapler
I did find some documentation regarding PJL commands for Stapling and/or Hole Punching with LaserJet M806/M830/M855/M880 devices - the PJL commands are quite different to the ones you are using,though.
You may be able to find device-specific documentation for your device - I don't know.
RE: programatically controlling the stapler
RE: programatically controlling the stapler
No idea, sorry.
I doubt that either of these 'languages' are anything to do with the faxing mechanism at all.
RE: programatically controlling the stapler
RE: programatically controlling the stapler
Just my $.02
"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."
--Greg
RE: programatically controlling the stapler
RE: programatically controlling the stapler
Just my $.02
"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."
--Greg
RE: programatically controlling the stapler
RE: programatically controlling the stapler
https://support.necam.com/printers/pclcodes/pcl5hp...
Just my $.02
"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."
--Greg
RE: programatically controlling the stapler
RE: programatically controlling the stapler
@PJL SET FOLDSPINDLEMUTILATE = OFF
@PJL SET AUTOJAM = OFF
;)
Just my $.02
"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."
--Greg
RE: programatically controlling the stapler
RE: programatically controlling the stapler
The parameters to the PJL SET command appear to vary from model to model, and there doesn't seem to be much in the way of documentation available (the old PJL Technical Reference manual and Addendum haven't been updated for years).
You may (on some devices) be able to find out what parameters are relevant for certain PJL variables, by using status read-back features.
For example, with a local LaserJet Enterprise M553x printer:
Note that, although it appears that the STAPLEOPTION variable is recognised, this particular printer does not have a stapler/stacker unit fitted, so the options are irrelevant - presumably the firmware supports the options for the situation where such a unit is fitted.
I've no idea whether or not your model would return the relevant data - you could try using the Status Readback tool in the PCL Paraphernalia application, available via http://www.pclparaphernalia.eu in order to find out.