[xep-support] Re: XEP 4.23 NullPointerException

uwe.goersch at lhind.dlh.de uwe.goersch at lhind.dlh.de
Tue Oct 10 06:04:52 PDT 2017


Hi Alexey,

We are tried to fix this issue within iText but until now without success.

It seems that viewing the Adobe Acrobat PDF viewer displays the PDF file “a1_attachment-1-page-3.pdf” without an error. I think that in such a case, it would be better if XEP would create a PDF image rather than not create a PDF image. Do you think you can do this in XEP? That would help us a lot. Thank you very much in advance for your support!

Best regards,
Uwe Goersch

Von: Xep-support [mailto:xep-support-bounces at renderx.com] Im Auftrag von Alexey Gagarinov
Gesendet: Samstag, 2. September 2017 02:50
An: STRECKWALDT, TILL <till.streckwaldt at lhind.dlh.de>
Cc: RenderX Community Support List <xep-support at renderx.com>
Betreff: [xep-support] Re: XEP 4.23 NullPointerException

Hi Till,
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 "hanging" links.
By "hanging" I mean an indirect PDF object reference without the PDF object itself.
For example,

<</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 PDF file.

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,
  Alexey Gagarinov
RenderX



Sitz der Gesellschaft / Corporate Headquarters: Lufthansa Industry Solutions BS GmbH, Raunheim, Registereintragung / Registration: Amtsgericht Darmstadt HRB 83850
Geschaeftsfuehrung / Management Board: Bernd Appel



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20171010/76059945/attachment.html>


More information about the Xep-support mailing list