ion, can you modify the pstopdf filter so it propagates the job's page
size, resolution, and margins into the conversion  process?

At first find the settings for the options PageSize and Resolution.
First via the fifth command line argument and if not specified there via
the PPD's default settings. Get width and height of the page via the
*PaperDimension line corresponding to the PageSize setting and the
margins via the appropriate *ImageableArea line in the PPD.

Add appropriate option settings to the ps2ps and ps2pdf calls

ps2pdf -dDEVICEWIDTHPOINTS=XXX -dDEVICEHEIGHTPOINTS=YYY -rXRESxYRES ...

For the margins it is more complicated as a PostScript variable of a
complex data type (array) has to be defined. This is not possible on the
command line. One has to inject PostScript code, for example with a
command line like this:

( echo -en '%!\n<</.HWMargins[50 50 50 50] /Margins[0
0]>>setpagedevice\n'; cat /usr/share/cups/data/testprint.ps ) | ps2pdf
-dDEVICEWIDTHPOINTS=800 -dDEVICEHEIGHTPOINTS=1200 -r600 - testprint.pdf

With all this we get at least the left box of the test page right and we
assure a clean conversion independent which paper size and resolution is
requested for the job and whether the incoming PostScript already comes
in the desired page size and defines it well and we are also prepared if
the conversion process does any optimization for the final printing
resolution.

ion, pitti, the test page itself still needs to be modified, as the
content of the right box is wrong. Users of a PostScript printer would
expect model name and serial number of their printer there. This info
cannot be pulled from the printer by the pstopdf filter. So these items
the test page should not show any more.

** Changed in: cupsys (Ubuntu)
     Assignee: (unassigned) => Johan Kiviniemi (ion)

** Summary changed:

- CUPS test page not suitable for PDF printing workflow, needs to be replaced
+ CUPS test page does not display correct print job data. pstopdf filter needs 
improvements, test page needs some changes

-- 
CUPS test page does not display correct print job data. pstopdf filter needs 
improvements, test page needs some changes
https://bugs.launchpad.net/bugs/263049
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to