-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PdfReadError: EOF marker not found error when opening pdf files generated from selenium snapshot #177
Comments
I want to say, that if I read PDF with PdfFileReader, then write with PdfFileWriter, and then read with FileReader once again, I've got: input_file = PdfFileReader(open("/tmp/zakodowany.pdf", "rb"))
|
Hi there, How this issue ended up? I'm facing the exact same problem right now. Thank you :) |
+1 |
Try to find “%%EOF” in last 1Mb of file.
I just hit this problem too. Please could this be fixed in the pip install version soon? |
* akolpakov/issue_177: Fix py-pdf#177 Try to find “%%EOF” in last 1Mb of file.
Again, this issue would be REALLY nice to have fixed in a pip release. I'm getting a bunch of auto-generated PDFs from customers, where the |
same issue here, would be fixed by PR #321... |
Same issue, please fix. |
I face the same issue! Anyone has found the way to solve it? |
I just use
|
Hi, It looks like a fix was submitted and a PR have been pending for some years, is this non-longer maintained? |
Can somebody share a PDF that has this issue? |
Certainly @MartinThoma, you can download it from there : Github throws this error when processing the file "Something went really wrong, and we can't process that file. ", so I had to upload it somewhere else. Here's how I created the file, in case you want to recreate it locally :
Obviously this will produce a dumb PDF, but it should be sufficient to reproduce the error. |
Thanks for the merge! |
Try to find “%%EOF” in last 1Mb of file. This fixes the issue with reading Selenium-generated PDF files. Closes py-pdf#177 Closes py-pdf#442 Closes py-pdf#480
I am using selenium and Ghost to capture screenshots as
pdf
. The code for saving screenshot isNow i can open these files in a pdf viewer(I am using Okular) and they look fine. But when i try to open them using this code
It gives error
PdfReadError: EOF marker not found
. The reason i am trying to open this file usingPdfFileReader
is that i need to merge several pdfs into one and for that i need to open these pdfs. I found a github issue #34 and it says it was resolved but i still face this issue. My pypdf version is 1.24The text was updated successfully, but these errors were encountered: