[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#388569: general: always printed in letter format



On Fri, Sep 22, 2006 at 01:00:28PM +0200, gregor herrmann wrote:
>On Thu, 21 Sep 2006 11:13:27 +0200, gerhard oettl wrote:
>
>> Since updating to etch some weeks ago i was not able to print
>> from firefox, because always letter format is requested on the
>> printer panel.
>
>Do you have /etc/papersize and what is its content?



ls -l /etc/paper*
-rw-r--r-- 1 root root 595 2002-03-20 12:02 /etc/paper.config
-rw-r--r-- 1 root root   3 2004-03-26 14:53 /etc/papersize
-rw-r--r-- 1 root root   7 2004-12-10 15:35 /etc/papersize.dpkg-dist
-rw-r--r-- 1 root root   7 2006-09-09 23:01 /etc/papersize.dpkg-inst
-rw-r--r-- 1 root root   7 2006-08-16 19:19 /etc/papersize.ucf-dist



File paper.config:

[Paper]
US-Letter={612 792 72 72 72 72}
US-Legal={612 1008 72 72 72 72}
A3={841.88976 1190.5512 80 80 80 80 }
A4={595.27559 841.88976 80 80 80 80}
A5={420.94488 595.27559 80 80 80 80}
B4={730 1034 60 60 60 60}
B5={500 710 80 80 80 80}
B5-Japan={517 730 80 80 80 80}
Half-Letter={612 397 72 72 72 72}
Executive={523 758 72 72 72 72}
Tabloid/Ledger={794 1227 72 72 72 72}
Monarch={280 542 10 10 10 10}
SuperB={843 1227 80 80 80 80}
Envelope-Commercial={298 686 5 5 5 5}
Envelope-Monarch={280 542 5 5 5 5}
Envelope-DL={312 625 5 5 5 5}
Envelope-C5={460 650 5 5 5 5}
EuroPostcard={298 420 5 5 5 5}

File papersize:
A4

File papersize.dpkg-dist:
letter

File papersize.dpkg-inst:
letter

File papersize.ucf-dist:
letter


I changed /etc/papersize from A4 to a4 temporary (and restarted
to be sure) -> unchanged behaviour.

The environment variables PAPERSIZE and PAPERCONF are not set.




I am not an expert in postscript but as far as i anderstand the
papersize is inital set correct to A4.

According to 
<http://partners.adobe.com/public/developer/en/ps/PS3010and3011.Supplement.pdf#search=%22postscript%20%2Fpagesize%20%20595%20site%3Aadobe.com%22>

the correct /PageSize value for A4 is [ 595 842 ] in default user
space units.

firefox by:
%%BoundingBox: 0 0 595 842
%%HiResBoundingBox: 0 0 595.25 841.9
%%DocumentPaperSizes: A4
and later in the suspect conditional area:
  dup /PageSize [ 595.25 841.9 ] put

xpdf by:
%%DocumentMedia: plain 595 841 0 () ()
%%BoundingBox: 0 0 595 841


The minimal differences seam to be ok. Both documents can 
be printed without changing this parts. But if the line 
containing
/PageSize 3
is present something unexpected happens.
All i understand is that a condition (that i dont anderstand) 
is tested and that the conditional part that contains that
/PaperSize 3 
line is proceeded.



Could there be an error in the ppd (postscript printer
description file) the reason for this? 
On the other hand: When setting the printer to a lexmark 
the first 250 lines of the postscript file are the same.



The printing also looks fine, if i remove the whole block that
contains that /PageSize 3 line. So it looks like this block is
not necessary at all or there is an error in the tested condition
and the test should return an result that does not process that
block.

--- firefox_letter.ps	2006-09-21 10:41:32.000000000 +0200
+++ firefox_a4-min.ps	2006-09-22 19:44:40.000000000 +0200
@@ -12,12 +12,7 @@
 
 %%BeginProlog
 /setpagedevice where
-{ pop 2 dict
-  dup /PageSize [ 595.25 841.9 ] put
-  dup /Policies 1 dict
-    dup /PageSize 3 put
-  put
-  setpagedevice
+{
 } if
 [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef


--- xpdf_letter.ps	2006-09-21 10:25:32.000000000 +0200
+++ xpdf_a4-min.ps	2006-09-22 19:46:21.000000000 +0200
@@ -17,12 +17,6 @@
 /pdfSetup {
   3 1 roll 2 array astore
   /setpagedevice where {
-    pop 3 dict begin
-      /PageSize exch def
-      /ImagingBBox null def
-      /Policies 1 dict dup begin /PageSize 3 def end def
-      { /Duplex true def } if
-    currentdict end setpagedevice
   } {
     pop pop
   } ifelse



The remaining question is: Where does this parts come from?


-- 
 .''`.   gerhard oettl   on   Debian/Gnu Linux
: :'  :  
`. `'`   gpg key: 1024D/D59131AA 2002-06-18
  `-



Reply to: