Subject: | |
From: | |
Reply To: | |
Date: | Mon, 31 Mar 2008 22:19:43 +0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Jon Peatfield wrote:
> 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...
It has a proper description of the printer, it gets the definition from
cups. I think it perfectly proper to assume the ppd it gets from cups
properly describes the final printer.
Spoolers such as cups aside, no program on *x should assume ot has a
real printer out there.
printing to a file doesn't explain anything.
I can, however, confirm the problem so it's worth reporting as a bug. I
asked for two copies of the current page and got four.
>
> 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).
>
In a moment of absolute brilliance I sent off a print job but put on
hold so I can inspect it. There doesn't seem to be anything in the
postscript, but in the associated control file there's this:
0000240: 3030 2100 0663 6f70 6965 7300 0400 0000 00!..copies.....
0000250: 0242 0019 6a6f 622d 6f72 6967 696e 6174 .B..job-originat
which I don't understand, but it looks interesting. Nothing interesting
in the cups log, but you might want to try your hand with tcpdump to see
what the actual traffic is.
--
Cheers
John
-- spambait
[log in to unmask] [log in to unmask]
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375
You cannot reply off-list:-)
|
|
|