Open
Bug 335356
Opened 19 years ago
Updated 2 years ago
Non DSC compliant PostScript output
Categories
(Core :: Printing: Output, defect)
Tracking
()
NEW
People
(Reporter: jsmeix, Unassigned)
Details
Attachments
(1 file)
219.53 KB,
text/plain
|
Details |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.11) Gecko/20050727
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; (x86_64) en-GB; rv:1.8.0.1) Gecko/20060409
When printimg from Mozilla/Firefox, its PostScript output is
not in compliance to the Adobe "PostScript Language Document Structuring
Conventions Specification" version 3.0 (the "DSC spec.").
According to section 2 of the DSC spec., a non-compliant document
may not receive any service from a document manager (like printing
only certain pages or n-Up printing and so on ...)
The details of what I found will follow.
Reproducible: Always
Steps to Reproduce:
1.
Use CUPS as the printing system.
2.
To get really what Mozilla/Firefox sends to a print queue
(i.e. to avoid special handling when printing directly
from Mozilla/Firefox into a file), set up a CUPS print queue
which outputs directly (i.e. without CUPS filtering) into a file:
In /etc/cups/cupsd.conf set "FileDevice Yes"
(otherwise cupsd won't output to real files - only to /dev/null).
and restart the cupsd.
Create the following interface script which is needed because
output into file does not work for a real "raw" queue
(at least not for CUPS 1.1):
/tmp/rawscript is this interface script:
------------------------------------------------------
#! /bin/bash
set -x
[ -n "$6" ] && exec <"$6"
cat -
exit 0
------------------------------------------------------
Set up the queue:
lpadmin -p rawfile -v file:/tmp/rawout.prn -i /tmp/rawscript -E
3.
Set up another queue using a generic PostScript printer PPD
which also prints into a file:
lpadmin -p file -v file:/tmp/out.prn -E \
-P /usr/share/cups/model/Postscript.ppd.gz
4.
Start Firefox and print via both queues:
/tmp/rawout.prn contains Firefox' output.
/tmp/out.prn contains contains what CUPS makes of it (in particular
what CUPS' pstops filter which acts as a "document mangager" makes of it).
Details (more details may follow later):
A) "printer specific settings":
Mozilla/Firefox PostScript includes:
--------------------------------------------------------------------------
%%BeginProlog
/setpagedevice where
{ pop 2 dict
dup /PageSize [ 612 792 ] put
dup /Policies 1 dict
dup /PageSize 3 put
put
setpagedevice
} if
--------------------------------------------------------------------------
"setpagedevice" stuff (i.e. any printer specific settings)
should not be in the prolog but in the script
in particular in the document setup section of the script
(see DSC spec section 4.1 versus section 4.2).
"setpagedevice" stuff (i.e. any printer specific settings)
should be embedded in a %%BeginFeature:...%%EndFeature block
(see DSC spec section 6.2)
Almost any %%BeginFeature:...%%EndFeature stuff should be
also mentioned as %%Requirements: or %%DocumentMedia:
DSC header comment (see DSC spec section 6.2).
B) "resources":
Mozilla/Firefox PostScript includes:
--------------------------------------------------------------------------
%%BeginProlog
...
%%EndProlog
%%BeginResource: font ...
...
%%EndResource
--------------------------------------------------------------------------
%%BeginResource:...%%EndResource blocks should be inside the
%%BeginProlog...%%EndProlog block (see DSC spec "Document Structure"
in particular see DSC spec Figure1)
C) "bare PostScript code in prolog"
Mozilla/Firefox PostScript includes:
--------------------------------------------------------------------------
%%BeginProlog
...
[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
...
/udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def
...
%%EndProlog
--------------------------------------------------------------------------
I don't know if bare PostScript in the prolog is DSC conformant.
As far as I see in the DSC spec, any block of PostScript code
should be included in an appropriate DSC comment block.
In the DSC spec the section "Document Structure" in particular
the Figure1 seems to show that in the %%BeginProlog...%%EndProlog
block there can be only %%BeginResource:...%%EndResource blocks.
Updated•19 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•19 years ago
|
||
Section A: related/dupe bug #334485?
Comment 4•19 years ago
|
||
Bug 324635 will add the beginFeature/endFeature tags to the setpagedevice block. Most of these other issues were fixed on the trunk by the patch for bug 322621.
I think the only remaining issue here is Requirements/DocumentMedia. Gecko outputs a DocumentPaperSizes comment, which was part of version 2.1 of the DSC spec but removed for version 3.0. For 3.0 we should output a DocumentMedia comment in the prolog and a PageMedia comment for each page.
A Requirements comment is used to specify color print jobs or multiple copies, among other things. I suppose we should also output one of those when appropriate.
And it'd be a good idea to roll up all of these changes and get them into the 1.8 branch.
Is there any chance of getting these fixes into the 1.8 branch?
Notably the fix in bug 322621 is needed to allow save to file output to be displayed in evince when using the (preferred) libspectre backend for PostScript.
Gv only handles these broken documents by chance (it treats the fonts as an implicit %%Setup block, only because they are output after %%EndProlog and before the first page).
I suspect this would also fix several of the other “it won’t print!” bug reports….
This really needs to get into the next firefox 2 and seamonkey 1.1 releases.
Updated•15 years ago
|
Assignee: printing → nobody
QA Contact: printing
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•