Subject: | |
From: | |
Reply To: | |
Date: | Mon, 31 Mar 2008 14:22:07 +0100 |
Content-Type: | TEXT/PLAIN |
Parts/Attachments: |
|
|
On Sat, 29 Mar 2008, John Summerfield wrote:
> Jon Peatfield wrote:
>> Today a user reported that printing from evince requesting N copies
>> results in N^2 copies comming out of the printer.
>>
>> Now a quick check shows that doesn't happen for trivial ps files but does
>> for trivial pdf files.
>>
>> What seems to be happening is that evince is converting the pdf to ps and
>> doing the N copies itself but also passing the copies option into cups so
>> the cups server then multiplies it again.
>>
>> I can find code in evince (evince-0.6.0-8.el5 srpm) which while converting
>> to postscript for printing sends each page N times. I can't find where it
>> is actually sending the job to the printer specifying #copies but my logs
>> on out print server show that the server is getting requests with copies
>> set.
>>
> Doesn't the number of copies go into the .ps file itself?
>
> There _may_ be a template around that gets munged.
>
> Ah, I googled for "postscript language reference" it's all available on
> Adobe's website, but you might prefer not to print it all.
[ I have a paper copy of the PS language reference (level-2) 'cos I needed
it for a previous (development) job ]
> Look for where these are set:
> #copies
> NumCopies
>
> Page 417 (which Evince thinks is page 431).
I hope it doesn't set those directly, since it would be bad form. Such
things are not supposed to be set by things except when sending directly
to a printer (in the same way that printer-specific options shouldn't be
used). It is possible that it is passing the copies through as a DSC
comment which cups is extracting but I hope not 'cos that would be
probably harder for me to hack...
What evince *seems* to do is send each page N time itself (there is a loop
in the code which converts to postscript). Quite seperatly it passes the
number of copies through to the cups system so that when the job is
recieved the cups server passed N on the command line of the pstops filter
so it then causes N copies to be printed (either by setting the relevant
postscript options or sending pages multiple times depending on other
options which are set).
--
Jon Peatfield, Computer Officer, DAMTP, University of Cambridge
Mail: [log in to unmask] Web: http://www.damtp.cam.ac.uk/
|
|
|