for i, v in enumerate(array.replace("null", "0").split()[1:]):
t[i] = float(v)
/XYZ 116.00001 745.92 0 34 0 R/XYZ 116.00001 745.92 0 40 0 R/XYZ 116.00001 745.92 0 47 0 R/XYZ 116.00001 745.92 0 56 0 R/XYZ 116.00001 745.92 0 64 0 R/XYZ 116.00001 745.92 0
['116.00001', '745.92', '0', '34', '0', 'R/XYZ', '116.00001', '745.92', '0', '40', '0', 'R/XYZ', '116.00001', '745.92', '0', '47', '0', 'R/XYZ', '116.00001', '745.92', '0', '56', '0', 'R/XYZ', '116.00001', '745.92', '0', '64', '0', 'R/XYZ', '116.00001', '745.92', '0']
which leads to the IndexError.
Description of the bug
When the attached file is processed, calling
page.get_links()leads to anIndexErrorfor page 14.How to reproduce the bug
This was traced down to the following lines in
src/__init__.py:For page 14 the
arrayvariable containsleading to the following array being enumerated in the loop:
which leads to the IndexError.
index_error.pdf
PyMuPDF version
Built from source
Operating system
Linux
Python version
3.12