apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.96k stars 465 forks source link

Problem printing GMT PostScript #1907

Closed michaelrsweet closed 18 years ago

michaelrsweet commented 18 years ago

Version: 1.2.2 CUPS.org User: jmkuhn

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.

michaelrsweet commented 18 years ago

CUPS.org User: mike

This file does not conform to the Adobe Document Structuring Conventions, yet claims to be conformant.

The main issues are:

1. There are two %%EndProlog comments in the file
2. The #copies variable is set outside the Begin/EndSetup block and does not use Begin/EndFeature, making it impossible to override the number of copies.
3. The scale command in the Begin/EndSetup block is illegal in that context - it must appear in the Begin/EndPageSetup since it affects the graphics state.