[xep-support] Re: XEP 4.23 NullPointerException

From: <uwe.goersch_at_ADDRESS_REMOVED>
Date: Tue Oct 10 2017 - 06:04:52 PDT

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@renderx.com] Im Auftrag von Alexey Gagarinov
Gesendet: Samstag, 2. September 2017 02:50
An: STRECKWALDT, TILL <till.streckwaldt@lhind.dlh.de>
Cc: RenderX Community Support List <xep-support@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

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

(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
Received on Tue Oct 10 06:03:19 2017

This archive was generated by hypermail 2.1.8 : Tue Oct 10 2017 - 06:03:33 PDT