File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1801,7 +1801,7 @@ def _read_xref_other_error(
18011801 return startxref
18021802 # No explicit xref table, try finding a cross-reference stream.
18031803 stream .seek (startxref , 0 )
1804- for look in range (5 ):
1804+ for look in range (25 ): # value extended to cope with more linearized files
18051805 if stream .read (1 ).isdigit ():
18061806 # This is not a standard PDF, consider adding a warning
18071807 startxref += look
Original file line number Diff line number Diff line change @@ -1342,3 +1342,11 @@ def test_iss1652():
13421342 name = "invalidNamesDest.pdf"
13431343 in_pdf = PdfReader (BytesIO (get_pdf_from_url (url , name = name )))
13441344 in_pdf .named_destinations
1345+
1346+
1347+ @pytest .mark .enable_socket ()
1348+ def test_iss1689 ():
1349+ url = "https://github.com/py-pdf/pypdf/files/10948283/error_file_without_data.pdf"
1350+ name = "iss1689.pdf"
1351+ in_pdf = PdfReader (BytesIO (get_pdf_from_url (url , name = name )))
1352+ in_pdf .pages [0 ]
You can’t perform that action at this time.
0 commit comments