Version: (using KDE KDE 3.4.2) Installed from: FreeBSD Ports OS: FreeBSD It seems there are regressions in kpdf 3.4.2's code that prevent it from reading some PDFs of mine which all worked for me in kpdf 3.4.1 (and still do when I install kdegraphics 3.4.1 into my KDE 3.4.2 environment). However: Those documents are my telephone and online bills, and I don't want to attach them to this bugreport for anyone to read. I can make them available to interested developers on request however - please reply to this bugreport or contact me directly.
N.B.: Latest kpdf from branches/3.4 doesn't work either.
You mean that kpdf 0.4.1 + KDE 3.4.1 works but kpdf 0.4.1 + KDE 3.4.2 does not work?
No, kpdf 0.4.2 + KDE 3.4.2 does not work, but kpdf 0.4.1 and KDE 3.4.2 does.
Ok, i misunderstood you then. 3.4.2 has a few changes that can be responsible for that, if you can send me that pdf i can try to see why it is happening, i promise to delete the documents after fixing.
SVN commit 442429 by aacid: Increase even more the bytes where we search for %%EOF up to the 1024 bytes the pdf spec says adobe checks for Michael that fixes the doc you sent me, does the same with all that failed for you? BUGS: 110000 M +6 -11 PDFDoc.cc --- branches/KDE/3.5/kdegraphics/kpdf/xpdf/xpdf/PDFDoc.cc #442428:442429 @@ -115,24 +115,19 @@ GBool PDFDoc::setup(GString *ownerPassword, GString *userPassword) { str->reset(); - char eof[9]; + char *eof = new char[1024]; int pos = str->getPos(); - str->setPos(8, -1); - eof[0] = str->getChar(); - eof[1] = str->getChar(); - eof[2] = str->getChar(); - eof[3] = str->getChar(); - eof[4] = str->getChar(); - eof[5] = str->getChar(); - eof[6] = str->getChar(); - eof[7] = str->getChar(); - eof[8] = '\0'; + str->setPos(1024, -1); + for (int i = 0; i < 1024; i++) eof[i] = str->getChar(); + eof[1024] = '\0'; if (strstr(eof, "%%EOF") == NULL) { error(-1, "Document does not have ending %%EOF"); errCode = errDamaged; + delete[] eof; return gFalse; } + delete[] eof; str->setPos(pos);
Indeed it does. Thank you very much!