Bug 118110

Summary: Wrong page size and layout in some documents
Product: [Unmaintained] kpdf Reporter: rack
Component: generalAssignee: Albert Astals Cid <aacid>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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;