[xep-support] Re: XEP 4.23 NullPointerException
agagarinov at renderx.com
Fri Sep 1 17:49:47 PDT 2017
> when using XEP 4.23 to create a PDF file with an additional PDF attachment, there is a
> NullPointerException and the resulting PDF cannot be read.
It's a 'a1_attachment-1-page-3.pdf' that cause the NPE.
This PDF file is a TOC and contains links.
Each link itself is an annotations with a GoTo action (in terms of PDF Specification).
In more simple words: you click on the link and will be forwarded to some place on other page.
A PDF splitting software (iText in your case) correctly removes all objects from other pages, but keeps the
By "hanging" I mean an indirect PDF object reference without the PDF object itself.
<</D[20 0 R/XYZ 52 715 0.0]/S/GoTo>>
where 20 0 R is the indirect reference to another page, but the obj #20 (20 0 R) itself is absent in the
In such a case XEP fails to create a PDF image.
And, in my opinion, it's the most reasonable behavior -- no PDF image when parsing of the PDF is failed.
Not with NPE, of course :) -- it's our fault, I will fix.
I believe it's worth to ping iText about removing "hanging" indirect objects for links (PDF Annots) during
splitting a PDF file.
With best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Xep-support