pdftops prints document shifted up and along 2 inches

John A. Murdie john at cs.york.ac.uk
Thu Apr 19 09:14:00 PDT 2007


> I have an A4 (so says Acrobat Standard 7.* on Windows) PDF document which prints ok with Acrobat Reader, Evince and XPDF on Linux, but which, when printed with the command "lpr doc.pdf" appears on the printer shifted up and along (both) 2 inches or so. There's nothing wrong with the printer - the problem is quite reproduceable.
>
> Any suggestions for debugging pdftops? - from version 1.2.8.
>
> John A. Murdie

Ah. Problem is with a2ps(1)'s output and unusual bounding boxes - and the CUPS pdftops filter. An example:

$ cat > mary.txt
Mary had a little lamb,
smothered in mint sauce,
and every bite that Mary tried,
tasted good, of course.
^D
$ a2ps --version
GNU a2ps 4.13
...
$ a2ps -M A4 -o mary.ps mary.txt # Slackware default is Letter paper!
[mary.txt (plain): 1 page on 1 sheet]
[Total: 1 page on 1 sheet] saved into the file `mary.ps'
$ head mary.ps%!PS-Adobe-3.0
%%Title: mary.txt
%%For: John Murdie
%%Creator: a2ps version 4.13
%%CreationDate: Thu Apr 19 14:55:11 2007
%%BoundingBox: 24 24 588 768
%%DocumentData: Clean7Bit
%%Orientation: Landscape
%%Pages: 1
%%PageOrder: Ascend
$ lpr mary.ps # prints ok
$ ps2pdf mary.ps mary.pdf
$ lpr mary.pdf # prints wrongly
$ psd2pdf -sPAPERSIZE=a4 mary.ps mary.pdf
$ lpr mary.pdf # prints wrongly as before
$ cp mary.ps mary.ps.orig
-- change mary.ps
$ diff mary.ps.orig mary.ps
6c6
< %%BoundingBox: 24 24 571 818
---
> %%BoundingBox: 0 0 595 842
$ ps2pdf mary.ps mary.pdf
$ lpr mary.pdf # still prints badly as above!

As I've said, acroread(1) and xpdf(1) print the original mary.pdf ok - so why doesn't CUPS' pdftops filter get this right also? All this with CUPS 1.2.8.

John A. Murdie





More information about the cups mailing list