Fix "Stream has ended unexpectedly" for Name Objects#211
Fix "Stream has ended unexpectedly" for Name Objects#211mstamy2 merged 2 commits intopy-pdf:masterfrom
Conversation
…or being raised unecessarily if a Name object runs right up against the end of a file stream.
…but the simplest cases.
|
After staring at that regex in the same function, I also made a few other minor fixes. Don't have a test case for them, but they seem pretty straightforward regex escape fixes. I would bet named objects were not working so well previously. |
|
I had a few PDFs lying around that exhibited this behavior. Fix works well. |
Fix "Stream has ended unexpectedly" for Name Objects
|
Hello, Thank you for your question, comments, and/or concerns regarding PyPDF2. Sincerely, Selma Kishwar Phaseit, Inc. On Tue, Jun 30, 2015 at 8:10 AM, Michael Sander notifications@github.com
|
Fix a bug which could result in a "Stream has ended unexpectedly" error being raised unnecessarily if a Name object runs right up against the end of a file stream.
I have a test case, but it's unfortunately very convoluted and will be quite difficult for me to get running in PyPDF. However, if one could somehow make a PDF with a inline stream object, and a Name object at the very end of the stream, then it would trigger this bug fix (not sure how to do that).