We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent def7a62 commit 9619441Copy full SHA for 9619441
1 file changed
PyPDF2/_reader.py
@@ -932,12 +932,14 @@ def read(self, stream):
932
933
# check and eventually correct the startxref only in not strict
934
xref_issue_nr = self._get_xref_issues(stream, startxref)
935
- if self.strict and xref_issue_nr:
936
- raise PdfReadError("Broken xref table")
937
- else:
938
- warnings.warn(
939
- "incorrect startxref pointer({})".format(xref_issue_nr), PdfReadWarning
940
- )
+ if xref_issue_nr != 0:
+ if self.strict and xref_issue_nr:
+ raise PdfReadError("Broken xref table")
+ else:
+ warnings.warn(
+ "incorrect startxref pointer({})".format(xref_issue_nr),
941
+ PdfReadWarning,
942
+ )
943
944
# read all cross reference tables and their trailers
945
self.xref = {}
0 commit comments