-
Type:
Bug
-
Status: Closed
-
Priority:
Blocker
-
Resolution: Duplicate
-
Affects Version/s: 2.0.15
-
Fix Version/s: None
-
Component/s: Writing
-
Labels:
In method doWriteTrailer an unsafe setter is called on getItem(COSName.ID).setDirect(true).
It was not done in PDFBox 2.0.14. This causes NPEs.
My quick and easy fix to restore PDFBox 2.0.14 behavior :
COSArray id = ((COSArray) trailer.getItem(COSName.ID)); if (id != null) { id.setDirect(true); }
Best regards,
M.Véron