Skip to content
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

Needs input: Disable strict mode for PdfFileReader #56

Closed
wants to merge 1 commit into from

Conversation

dreua
Copy link
Member

@dreua dreua commented Feb 21, 2019

With strict = False exporting certain pdf files (e.g. #54) works.
Warnings are printed to stdout so they can be easily missed and are not visible at all when the application is not started from a command line.

@jeromerobert
Copy link
Member

Shouldn't we investigate the warndest and/or overwriteWarnings parameters to have those warnings into a pop up dialog ? Of course this would only be reasonable if there are not too many of them.

@dreua
Copy link
Member Author

dreua commented Feb 24, 2019

Yes, I'm on that, but either it's not that straightforward or it's broken.

@jeromerobert
Copy link
Member

It's broken. https://github.com/mstamy2/PyPDF2/blob/master/PyPDF2/pdf.py#L1129 change the default argument but this default argument is never used. The warnings python module always call showwarning with file=None. Anyway a library which modify the default of another library is a violation of many programming rules. I will try an other way.

@dreua dreua deleted the disable_strict branch March 23, 2019 11:04
@jeromerobert jeromerobert mentioned this pull request Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants