Bug 143322 - Kpdf fails to render pdf file
Summary: Kpdf fails to render pdf file
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-22 05:27 UTC by Ismail Donmez
Modified: 2007-03-22 21:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Pdf file that renders incorrectly (32.54 KB, application/pdf)
2007-03-22 05:27 UTC, Ismail Donmez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ismail Donmez 2007-03-22 05:27:05 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Unlisted Binary Package
OS:                Linux

Attached file is generated by Reportlab, is almost empty in kpdf ( no graphics ) but is rendered correctly by Acrobat Reader.
Comment 1 Ismail Donmez 2007-03-22 05:27:32 UTC
Created attachment 20065 [details]
Pdf file that renders incorrectly
Comment 2 Pino Toscano 2007-03-22 13:21:42 UTC
Which version(s)? 3.5.6, SVN or both?
Comment 3 Ismail Donmez 2007-03-22 13:24:54 UTC
3.5 SVN, didn't have a chance to check with vanilla 3.5.6
Comment 4 Albert Astals Cid 2007-03-22 21:42:29 UTC
SVN commit 645533 by aacid:

Accept Width and Height as reals too
BUGS: 143322


 M  +10 -4     Gfx.cc  


--- branches/KDE/3.5/kdegraphics/kpdf/xpdf/xpdf/Gfx.cc #645532:645533
@@ -3389,18 +3389,24 @@
     obj1.free();
     dict->lookup("W", &obj1);
   }
-  if (!obj1.isInt())
+  if (obj1.isInt())
+    width = obj1.getInt();
+  else if (obj1.isReal())
+    width = (int)obj1.getReal();
+  else
     goto err2;
-  width = obj1.getInt();
   obj1.free();
   dict->lookup("Height", &obj1);
   if (obj1.isNull()) {
     obj1.free();
     dict->lookup("H", &obj1);
   }
-  if (!obj1.isInt())
+  if (obj1.isInt())
+    height = obj1.getInt();
+  else if (obj1.isReal())
+    height = (int)obj1.getReal();
+  else
     goto err2;
-  height = obj1.getInt();
   obj1.free();
 
   // image or mask?