Version: 0.4.2 (kde 3.4.2) (using KDE KDE 3.4.2) Installed from: Gentoo Packages Compiler: gcc 3.3.5 OS: Linux I've got a couple of pdf files that kpdf can't open. Xpdf and kghostview, and also the previous version of kpdf can open them perfectly. The have tables inside rotated 90 degrees. I want to attach the file.
Created attachment 12126 [details] This is one of the pdf files. This is one of the pdf files that kpdf can't open.
SVN commit 443936 by aacid: Fix %%EOF checking BUGS: 110353 M +9 -1 PDFDoc.cc --- branches/KDE/3.4/kdegraphics/kpdf/xpdf/xpdf/PDFDoc.cc #443935:443936 @@ -127,7 +127,15 @@ eof[i] = ch; } eof[i] = '\0'; - if (strstr(eof, "%%EOF") == NULL) + + bool found = false; + for (i = i - 5; i >= 0; i--) { + if (strncmp (&eof[i], "%%EOF", 5) == 0) { + found = true; + break; + } + } + if (!found) { error(-1, "Document does not have ending %%EOF"); errCode = errDamaged;