I create a PDF from k2opt, only export few pages.
When I try to get the bookmarks of this pdf file, It's raise ValueError: invalid literal for int() with base 10: ''
pdf = PdfFileReader("1.pdf")
pdf.getOutlines()
I think the problem is this pdf has some not normal IndrectObject, like this:
-1 0 R
In generic.py, the IndirectPattern should be:
IndirectPattern = re.compile(b_(r"[+-]?(\d+)\s+(\d+)\s+R[^a-zA-Z]"))
and maybe line 89 to 92 should be committed.
1.pdf