[HIGH] STR #1907: Problem printing GMT PostScript

Helge Blischke h.blischke at srz.de
Fri Aug 11 08:42:08 PDT 2006


John M Kuhn wrote:
>>John M Kuhn wrote:
>>
>>>[STR New]
>>>
>>>I have a problem when printing PostScript files created with GMT (Generic
>>>Mapping Tools) using Ubuntu Dapper 6.06.  This is using cupsys version
>>>1.2.2-0ubuntu0.6.06.  I create a PostScript file with the following
>>>command:
>>>
>>>/usr/lib/gmt/bin/psxy --PAPER_MEDIA=letter -R1/7.5/1/10 -JX6.5i/9i \
>>>   -Ba1f0.25WSne -P /dev/null > test.ps
>>>
>>>The resulting test.ps file previews correctly in gv and every other
>>>PS viewer I have tried.  When I print the file, the resulting page
>>>has my figure magnified about 4x such that the lower left of the
>>>figure fills the entire page.  I get the same result on 4 different
>>>PostScript printers (different models and manufacturers).
>>>
>>>Other PostScript files generated in OOo or Firefox print correctly.
>>>
>>>The file will print correctly if I use "-oraw".
>>>If I copy the test.ps file to other machines running CUPS 1.1.23
>>>or other spooling systems, the file will print correctly on the
>>>same 4 printers.
>>>
>>>It appears that pstops is doing something that causes the PostScript
>>>command "0.24 0.24 scale" to be ignored resulting in the figure
>>>being scaled by a factor of 4.16667.
>>>
>>>I filed a bug with Ubuntu:
>>>   https://launchpad.net/distros/ubuntu/+source/cupsys/+bug/55694
>>>
>>>Pascal De Vuyst confirmed the bug and suggested that I file here.
>>>
>>>Link: http://www.cups.org/str.php?L1907
>>>Version: 1.2.2
>>
>>The generated PS stream violates the DSC in the following respects:
>>
>>(1) the first %%EndProlog comment line must be deleted; there is another one
>>     at the (presumably) correct position.
>>(2) The prolog section is in fact a mixture of procedure definitions
>>     ans setup statements.
>>
>>But fixing (1) above should be enough to make it suitable for the pstops
>>filter of 1.2.x.
>>
>>If you cannot fix this in GMT and desperately need it to work with CUPS 1.2.x,
>>let me know; fixing (1) above could be done by a simple filter script
>>in CUPS.
>>
>>Helge
>>
>>--
>>Helge Blischke
>>Softwareentwicklung
>>SRZ Berlin | Firmengruppe besscom
>>http://www.srz.de
> 
> 
> I tried removing the first %%EndProlog and it doesn't make any
> difference in my printed result.  I agree that it is a problem and
> I will report back to the GMT authors about this.
> 
> Although I know a bit about PostScript, I don't understand your
> second comment.  Are you saying that some of what is in Prolog
> should be moved to section Setup?

Now, looking into svn.easysw.com/trunc/filters/pstops.c, it seems that the setup handling
in this filter is broken by design:
If the PS job is (or claims to be) DSC conformant, the prolog section and the setup
section are copied as is (except for feature requests in the setup section, which seem to
be honoured), and at the end of the setup section the stuff specified by the PPD (default
settings etc.) and job attributes are inserted. That means that many of the setup statements
legally inserted by the original creator (like transformations, color setup, and the like)
are cancelled by the setup stuff from the PPD, especially setpagedevice statements
(note: setpagedevice causes an initgraphics!!!). That is why your scale factor gets lost
in 1.2.x.

Sorry to disappoint you.

Helge

PS: a Note to Michael Sweet: this clearly is a show stopper for us, which prevents us to upgrade
to this version until fixed.

-- 
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de




More information about the cups mailing list