[Kde-print-devel] [Bug 139740] kde fails to print in landscape format
Kurt Pfeifle
pfeifle at kde.org
Wed Jan 10 21:39:08 CET 2007
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=139740
------- Additional Comments From pfeifle kde org 2007-01-10 21:39 -------
Final comment. I had another look at the files Hannes attached.
kurt soprano:~> pdfinfo bug-139740.pdf
Title: PerTable.ai
Creator: Adobe Illustrator 10.0
Producer: Adobe PDF library 5.00
CreationDate: Mon 03 Mar 2003 04:46:10 PM CET
ModDate: Wed 03 Sep 2003 04:05:41 PM CEST
Tagged: no
Pages: 1
Encrypted: no
Page size: 792 x 612 pts (letter)
File size: 299388 bytes
Optimized: yes
PDF version: 1.4
kurt soprano:~> head -n7 print_freebsd.ps
%!PS-Adobe-3.0
%%Creator: xpdf/pdftops 3.00
%%LanguageLevel: 2
%%DocumentSuppliedResources: (atend)
%%DocumentMedia: plain 595 842 0 () ()
%%BoundingBox: 0 0 595 842
%%Pages: 1
kurt soprano:~> head -n7 print_kubuntu.ps
%!PS-Adobe-3.0
%%Creator: xpdf/pdftops 3.00
%%LanguageLevel: 2
%%DocumentSuppliedResources: (atend)
%%DocumentMedia: plain 793 612 0 () ()
%%BoundingBox: 0 0 793 612
%%Pages: 1
To sum it up: You can already see, that these two files were created by the same version of Xpdf/pdftops, but they have defined differently their "DocumentMedia" and "BoundingBox" statements. FreeBSD is for A4, while Kubuntu is for Letter. Look more closely: FreeBSD is in "portrait" mode (higher than wide), Kubuntu is in landscape (wider than high). Let's look if there are more differences:
kurt soprano:~> sdiff -sbB print_freebsd.ps print_kubuntu.ps
%%DocumentMedia: plain 595 842 0 () () | %%DocumentMedia: plain 793 612 0 () ()
%%BoundingBox: 0 0 595 842 | %%BoundingBox: 0 0 793 612
595 842 false pdfSetup | 793 612 true pdfSetup
36.1427 0 translate | 36.1427 7.16094e-15 translate
Yes! The difference between "true" and "false" for the pdfSetup is not as important as it seems. But the order of the page size parameters is! It makes Kubuntu change from portrait media orientation to landscape.
----> change the order of the pdfSetup parameters to "793 612" and gs will
display it alright (the "true" vs. "false" statement doesn't influence
this; a "clean" file will have all the other statements correct as
well).
One more thing:
---------------
I used plain "gs" to look at the files. Later, I also used "gv" and "kghostview". "gv" displays even the faulty Kubuntu file correctly!! kghostview behaves like gs.
Moral:
------
--> Find out about faulty PS files (rotation, BoundingBoxes): use "gs".
--> Look at full file nevertheless (and change media size etc.): use "gv".
More information about the Kde-print-devel
mailing list