https://bugzilla.novell.com/show_bug.cgi?id=774961 https://bugzilla.novell.com/show_bug.cgi?id=774961#c6 --- Comment #6 from Johannes Meixner <jsmeix@suse.com> 2012-10-19 11:00:20 CEST --- Background information: When CUPS gets PDF it runs /usr/bin/pdftops to convert it into generic PostScript because CUPS needs generic PostScript so that it can add the PostScript snippets from the PPD file to enable this or that option in a PostScript printer. I assumed that CUPS runs /usr/bin/pdftops in a generic way to get generic PostScript (without any printer specific options set by pdftops via "setpagedevice" stuff) because the printer specific options are set by CUPS via the PostScript snippets from the PPD which are inserted into the generic PostScript which makes it printer specific PostScript. It cannot work well when there is more than one tool which makes the PostScript printer specific because this result conflicts when several tools set the same kind of option (e.g. the paper size) several times. E.g. when LibreOffice sets the paper size to be A4 but it should be printed on a printer with Legal paper so that CUPS sets the paper size to be Legal, see https://bugzilla.novell.com/show_bug.cgi?id=117730#c8 How CUPS calls pdftops: To verify how CUPS calls /usr/bin/pdftops, I did # mv /usr/bin/pdftops /usr/bin/pdftops.away and installed this as -rwxr-xr-x /usr/bin/pdftops ------------------------------------------------------------- #! /bin/bash echo $@ >/tmp/pdftops.args set >/tmp/pdftops.env sleep 60 exit 0 ------------------------------------------------------------- I set up a test print queue: # lpadmin -p testq -v file:///tmp/testq.out \ -P /usr/share/cups/model/Postscript.ppd.gz -E Then I sent a print job: ----------------------------------------------------------------- # echo "Hello" | a2ps -1 -M a4 -o- | ps2pdf - - | lp -d testq [stdin (plain): 1 page on 1 sheet] [Total: 1 page on 1 sheet] sent to the standard output request id is testq-93 (0 file(s)) ----------------------------------------------------------------- This is what ps shows while /usr/bin/pdftops runs: ------------------------------------------------------------------------- lp ... /bin/bash /usr/bin/pdftops -level3 /var/spool/cups/d00093-001 - ------------------------------------------------------------------------- and accordingly /tmp/pdftops.args contains ------------------------------------------------------------- -level3 /var/spool/cups/d00093-001 - ------------------------------------------------------------- As expected CUPS calls /usr/bin/pdftops in a generic way. I still leave it as needinfo from Goutam Kodu for further analysis because I do not have his environment with a printer that can print on special media like Envelope Monarch. How CUPS may have to call pdftops: All what matters is that pdftops produces PostScript with the same bounding box (i.e. the actually used printed area) as it was in the PDF. If the actually printed area in the PDF exceeds the printable area of the printer device, it is correct - from the printing system's point of view - that then some portion of what should actually be printed is clipped at some edge(s) of the paper. Goutam Kodu, please verify that the bounding box of the printing output in LibreOffice is the same as the bounding box of the PostScript that is produced by pdftops and that the bounding box fits within the printable area of your particular printer device. If the bounding box of the PostScript differs from the bounding box of the PDF, please try out if pdftops needs explicit parameters set (see "man pstopdf") to keep the bounding box unchanged. "man pstopdf" tells much about options that might influence the bounding box (i.e. size and position of the content on the paper). I don't know what the right settings are in particular regarding -origpagesizes which seems to produce printer specific PostScript with setpagedevide stuff which can conflict with what CUPS will latee add as PostScript snippets versus -paper match that (hopefully) produces generic PostScript and -nocrop -noshrink -nocenter which seem to be needed to switch off the pdftops defaults to crop, shrink, and center the content if needed. Vincent Untz, do you perhaps know if there is a recommeded way how to call pdftops to generate generic PostScript that truly matches what there is in the PDF? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.