Closed eth-wa closed 2 days ago
Thanks for the report. This specific PDF declares a destination of null
, which does not look right:
58 0 obj
<<
/Border [0 0 0]
/A <<
/Type /Action
/S /GoTo
/D null
>>
/NM (AJNXWZZHGGPOHNQA)
/Rect [1995 2679 2007 2706]
/Subtype /Link
>>
endobj
Inserting
if isinstance(d, NullObject):
continue
after https://github.com/py-pdf/pypdf/blob/bd5b962e81c7cd9ad29aa7ff7dedb4197326ebbb/pypdf/_writer.py#L3002 seems to fix this.
I am using pypdf to merge PDF files. I haven't had an issue, until I hit a specific PDF file. Every other PDF file (even ones from the same "bundle" [plan set]). I just have no idea why this PDF file is having an issue with the Writer, or if there is any sort of workaround/front end adjustment I can make to the PDF file.
Environment
Code + PDF
This is a minimal, complete example that shows the issue:
File link below: C0.00 - COVER SHEET.pdf
Traceback
This is the complete traceback I see: