Bugzilla – Bug 696314
Add PJL to staple documents
Last modified: 2016-04-25 08:29:06 UTC
It would be jolly nice if you could generate PCL documents which included the PJL to turn on the stapler.
I've had success doing this by post-processing ghostscript's output with Perl:
$pcl =~ s/(\@PJL)/\@PJL SET FINISH=STAPLE\n$1/;
However, this seems a tad messy. It would be nicer to just add code to emit
@PJL SET FINISH=STAPLE
One way to present this to the user would be a command line switch e.g.
-jFINISH=STAPLE, but perhaps it would be better to expose a more general
interface to allow arbitrary PJL to be included. Alternatively, perhaps
a more specific -staple option would be better.
Some printers allow more control over the staple position and orientation.
This can also be controlled with PJL, but I don't know the details, nor if
it's a manufacturer specific issue.
We'd like the pxl devices to support setpagedevice staple. We do not want to pass arbitrary PJL through the command line. Making this a bountiable enhancement for the pxl device.
Created attachment 12034 [details]
adding the Staple option.
This patch adds the Staple option, used the same way as the other options like Tumble and Duplex e.g.
gs -dStaple -sDEVICE=pxlcolor -o withStaple.pxl examples/tiger.eps
Sorry for the delay Hin-Tak. This looks okay, I'd prefer a git format-patch against the current code.
I don't know if you've noticed but the bounties have increased (doubled).
Created attachment 12348 [details]
rebased patch to current code base. Works the same way.
Author: Henry Stiles <firstname.lastname@example.org>
Date: Mon Apr 25 09:21:24 2016 -0600
Bug 696314, Add PJL to staple documents.
Staple setting for the PXL devices courtesy of Hin-Tak Leung.