Bug 118110 - Wrong page size and layout in some documents
Summary: Wrong page size and layout in some documents
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-11 13:26 UTC by rack
Modified: 2005-12-11 21:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rack 2005-12-11 13:26:18 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Gentoo Packages
Compiler:          gcc-3.4.4 
OS:                Linux

You can try yourself at http://www.taz.de/taz/nf/etc/digiabotest.html

Look at those pdfs with kpdf 3.5:

The first page of this paper is rendered correctly:

http://www.taz.de/taz/nf/etc/2005_05_06_S01-s1-bln-01.pdf

The other pages have a different size and much smaller text. Hard to read, i think. 

Example (single page):

http://www.taz.de/taz/nf/etc/2005_05_06_S02-akt-west-02.pdf

Example (complete paper):

http://www.taz.de/taz/nf/etc/2005_05_06.pdf

Ok, enough examples. They rendered correctly with kde 3.4 version of kpdf. They are also rendered incorrectly in xpdf, so i assume the bug is to be found somewhere in the shared code. 

Expected Behaviour: single page example should have the same layout as the title page (well, not exactly the same, of course). If you've got an old version of kpf or xpdf or acrobat reader, you'll see what i mean.
Comment 1 Albert Astals Cid 2005-12-11 21:10:59 UTC
SVN commit 487750 by aacid:

cropBox can not be bigger than mediaBox
Thanks to Peter Linnell (mrdocs) from the Scribus Team for helping with the debugging
BUGS: 118110


 M  +7 -0      Page.cc  


--- branches/KDE/3.5/kdegraphics/kpdf/xpdf/xpdf/Page.cc #487749:487750
@@ -66,6 +66,13 @@
   if (!haveCropBox) {
     cropBox = mediaBox;
   }
+  else
+  {
+    // cropBox can not be bigger than mediaBox
+    if (cropBox.x2 - cropBox.x1 > mediaBox.x2 - mediaBox.x1 ||
+        cropBox.y2 - cropBox.y1 > mediaBox.y2 - mediaBox.y1)
+	    cropBox = mediaBox;
+  }
 
   // other boxes
   bleedBox = cropBox;