[nzlug] cups: printing n postscript copies without downloading n
times
David McNab
david at rebirthing.co.nz
Sat Jul 7 15:05:09 NZST 2007
Hi,
After submitting a print job with n copies, and waiting for my clunky
old hp2550l colour laserjet to download n copies of the same ps data
over and over again, I decided to take a deeper look.
For one, 'lpr -# <num_copies>...' doesn't work. The '-# nnn' got
ignored, at least on my Ubuntu box.
And when I opt for more than 1 copy when printing from Acroread and
other progs, I get n copies, but the data gets sent n times. With the
doc I was printing, it took 45 secs to download the data over USB2 each
time. Bit of a time-waster when printing 100 copies! :(
But a bit of Googling came up with a way to hack the .ps file to embed a
number of copies.
In my case, the .ps files are generated by saving an OOo doc to PDF,
then converting to ps with pdf2ps.
Then, editing the .ps file and finding a line which starts with:
'%%BeginProlog'
and adding before it the lines (change the '25' to the number of copies
you want):
%%BeginSetup
/#copies 25 def
%%EndSetup
This worked like a charm - data downloads only once, and the printer
keeps cycling through it and spits out n copies.
Does anyone know of a simpler way?
If not, I'd be happy to just implement a little python or awk filter
script to add it.
Cheers
David
More information about the NZLUG
mailing list