Details
Description
Occasionally I encounter PDFs that have COSNumber's encoded with a preceding plus sign, like "+018", "+1" etc. This is a valid number representation, according to PDF 32000-1:2008 section 7.3.3.
COSNumber fails to parse these on JDK 1.6 and below. JDK 1.7 and above does not have the problem because Long.parseLong parses these correctly (in JDK 1.6 and below the plus sign would causes a NumberFormatException.)
I patched COSNumber with a simple fix on 1.8.8 and and verified that the fix worked against the affected PDFs. The bug exists in later versions of PDFBox, including the trunk. I will attach SVN patches for 1.8.8 and the trunk.