Skip to content

Commit

Permalink
Change the default to strict=False
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed May 1, 2022
1 parent 3713c8f commit 34b2767
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions PyPDF2/_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ class PdfFileReader(object):
string representing a path to a PDF file.
:param bool strict: Determines whether user should be warned of all
problems and also causes some correctable problems to be fatal.
Defaults to ``True``.
Defaults to ``False``.
:param warndest: Destination for logging warnings (defaults to
``sys.stderr``).
"""

def __init__(self, stream, strict=True, warndest=None):
def __init__(self, stream, strict=False, warndest=None):
self.strict = strict
self.flattenedPages = None
self.resolvedObjects = {}
Expand Down Expand Up @@ -1026,7 +1026,7 @@ def _read_standard_xref_table(self, stream):
PdfReadWarning,
)
# if table not zero indexed, could be due to error from when PDF was created
# which will lead to mismatched indices later on, only warned and corrected if self.strict=True
# which will lead to mismatched indices later on, only warned and corrected if self.strict==True
firsttime = False
readNonWhitespace(stream)
stream.seek(-1, 1)
Expand Down
4 changes: 2 additions & 2 deletions PyPDF2/merger.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ class PdfFileMerger(object):
:param bool strict: Determines whether user should be warned of all
problems and also causes some correctable problems to be fatal.
Defaults to ``True``.
Defaults to ``False``.
"""

def __init__(self, strict=True):
def __init__(self, strict=False):
self.inputs = []
self.pages = []
self.output = PdfFileWriter()
Expand Down

0 comments on commit 34b2767

Please sign in to comment.