Bug 140482

Summary: Can't open some pdfs, xpdf and acroread can, testcase link provided
Product: [Applications] kpdf Reporter: gmud <geroxp>
Component: generalAssignee: Albert Astals Cid <aacid>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 0.5.5   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description gmud 2007-01-23 09:56:25 UTC
Version:           0.5.5 (using KDE 3.5.5, Gentoo)
Compiler:          gcc version 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
OS:                Linux (i686) release 2.6.18-suspend2

The following pdf can be opened with xpdf and acroread, but not wiht kpdf. Kpdf shows only a very small empty rectangle.

http://www.phydid.de/showpdf.php?artikel_id=91
Comment 1 Albert Astals Cid 2007-01-23 19:41:08 UTC
SVN commit 626574 by aacid:

The mimetype system is returning that the file at http://www.phydid.de/showpdf.php?artikel_id=91 is an octet-stream for some strange reason.
As kpdf is a pdf viewer assume octet-stream are pdf.
This is a quick fix for KDE 3.5.7 but for KDE 4 and okular this fix is not admisible. :-/
BUGS: 140482


 M  +1 -1      document.cpp  


--- branches/KDE/3.5/kdegraphics/kpdf/core/document.cpp #626573:626574
@@ -151,7 +151,7 @@
     d->xmlFileName = locateLocal( "data", fn );
 
     // create the generator based on the file's mimetype
-    if ( (*mime).is( "application/pdf" ) )
+    if ( (*mime).is( "application/pdf" ) || (*mime).is( "application/octet-stream" ) )
         generator = new PDFGenerator( this );
 //    else if ( mimeName == "application/postscript" )
 //        kdError() << "PS generator not available" << endl;