Bug 140482 - Can't open some pdfs, xpdf and acroread can, testcase link provided
Summary: Can't open some pdfs, xpdf and acroread can, testcase link provided
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Applications
Component: general (show other bugs)
Version: 0.5.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-23 09:56 UTC by gmud
Modified: 2007-01-23 19:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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;