<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Till,<br>
<br>
</div>
<blockquote type="cite"
cite="mid:D3840BB96087B44295E4B83626E8ABB5AE61CD@SW-HAMADS-MBX33.ads.dlh.de"><!-- Template generated by Exclaimer Mail Disclaimers on 02:47:00 Wednesday, 30 August 2017 -->
<style type="text/css">P.ImprintUniqueID {
MARGIN: 0cm 0cm 0pt
}
LI.ImprintUniqueID {
MARGIN: 0cm 0cm 0pt
}
DIV.ImprintUniqueID {
MARGIN: 0cm 0cm 0pt
}
TABLE.ImprintUniqueIDTable {
MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
page: Section1
}
</style><!-- Template generated by Exclaimer Mail Disclaimers on 02:46:59 Wednesday, 30 August 2017 -->
<style type="text/css">P.ImprintUniqueID {
MARGIN: 0cm 0cm 0pt
}
LI.ImprintUniqueID {
MARGIN: 0cm 0cm 0pt
}
DIV.ImprintUniqueID {
MARGIN: 0cm 0cm 0pt
}
TABLE.ImprintUniqueIDTable {
MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
page: Section1
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<p class="ImprintUniqueID">
</p>
<p class="ImprintUniqueID">
</p>
<div class="WordSection1"><span lang="EN-US">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.<o:p></o:p></span>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</blockquote>
<br>
It's a 'a1_attachment-1-page-3.pdf' that cause the NPE.<br>
<br>
This PDF file is a TOC and contains links.<br>
Each link itself is an annotations with a GoTo action (in terms of
PDF Specification).<br>
In more simple words: you click on the link and will be forwarded to
some place on other page.<br>
<br>
A PDF splitting software (iText in your case) correctly removes all
objects from other pages, but keeps the "hanging" links.<br>
By "hanging" I mean an indirect PDF object reference without the PDF
object itself.<br>
For example,<br>
<br>
<</D[20 0 R/XYZ 52 715 0.0]/S/GoTo>><br>
<br>
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.<br>
<br>
In such a case XEP fails to create a PDF image.<br>
And, in my opinion, it's the most reasonable behavior -- no PDF
image when parsing of the PDF is failed.<br>
Not with NPE, of course :) -- it's our fault, I will fix.<br>
<br>
I believe it's worth to ping iText about removing "hanging" indirect
objects for links (PDF Annots) during splitting a PDF file.<br>
<br>
---<br>
With best regards,<br>
Alexey Gagarinov<br>
RenderX<br>
<br>
</body>
</html>