jsvine / pdfplumber

Plumb a PDF for detailed information about each char, rectangle, line, et cetera — and easily extract text and tables.
MIT License
6.57k stars 659 forks source link

addressing issue #578 #581

Closed augeos-grosso closed 2 years ago

augeos-grosso commented 2 years ago

This PR fixes #578 . Indeed the line causing the missed close() call on Windows (and only on Windows it seems) was the one @samkit-jain pointed out.

The original exception was pdfminer.pdfparser.PDFSyntaxError, but i figured it would be best using pdfminer.psparser.PSException, since it is the most general exception i could find that made sense using.

jsvine commented 2 years ago

Thanks for filing this @augeos-grosso! Two quick things:

jsvine commented 2 years ago

Thanks! And, hmmm, workflow still seems gummed up. I'll take a closer look later today; I could just run the tests locally if it comes to that.

augeos-grosso commented 2 years ago

Of course! I'm here to help if you need me

jsvine commented 2 years ago

Thanks again @augeos-grosso! Ran the tests locally — they passed, but coverage decreased since there were no tests added for this change. That's fine. They're simple tests. I've now written them and will push them to develop.