Hello everyone,

we're using PDFBox to import annotations from XFDF files and add them to 
existing PDF files.

First we create a FDFDocument from the XFDF, then we fetch the list of 
FDFAnnotations from it via
< FDFDocument>.getCatalog().getFDF().getAnnotations()

Then we iterate over this list, create PDAnnotations from the COS objects of 
the FDFAnnotation with PDAnnotation.createAnnotation()
and add the PDAnnotation to the list of page annotations we got from 
PDPage.getAnnotations()

For most PDFs and most XFDF files, this works without any issues.
However, some PDF files with merged annotations, when opened in Adobe Reader, 
produce a huge number of popups with the message

"Expected a name object" / "Namensobjekt wurde erwartet"

before the PDF is fully rendered, while the original file does not show such a 
behaviour.
When such PDF files are opened in Foxit PDF Reader or PDFDebugger, they are 
rendered just fine without errors.

We saw this happen every now and then over the years, with all PDFBox V2 
versions, including 2.0.29,
but it appears to have become more frequent recently, so user complaints are 
becoming more frequent too.

As I'm unable to share sample PDFs/XFDFs due to compliance reasons, I just have 
the question if anyone happens to have some hints
what I could look for in an affected PDF (preferably using PDFDebugger) to find 
out what Adobe Reader doesn't like ?

Ideally, I then can try to compare it with the original and find the part of 
the process which "breaks" the result.

Thanks in advance,

Kai

[cid:image001.png@01D9C45C.B9E94C50]<https://thinkproject.com/de/>
Kai Keggenhoff / Senior Software Developer

thinkproject.com <https://thinkproject.com/de>
[cid:image002.png@01D9C45C.B9E94C50]<https://www.linkedin.com/company/thinkproject-dach/posts/?feedView=all>[cid:image003.png@01D9C45C.B9E94C50]<https://twitter.com/thinkproject_>
Read our legal information (imprint) 
here<https://thinkproject.com/de/impressum/>.

Reply via email to