Document has new and misplaced annotations after adding them through PDFTron

Hi there,

We have a document (from one of our customers) where the document has new/misplaced annotations when we add annotations through PDFTron.

The file is attached. Even adding any annotation has mysterious effects on the document. We are using the Python binary to add these annotations.

Do let us know what we are doing wrong or what could be wrong with the document.


p-19068373RayLodge180116.pdf (673 KB)

First, I would recommend updating to the latest version of PDFNet. I was not able to observe any issue adding annotations to this document.

Otherwise, to diagnose the issue further we need the following information.

  1. Input file(s)
  2. Generated output file(s)
  3. Clear description of what you expected to get (include screenshot if appropriate as we may not see what you do)
  4. Code you used to generate the output.

1,2: Input file and output files are attached.

  1. In the output file, there is a document icon on the top left which was not added as an annotation nor was it present in the original input document.

  2. This is the snippet we use to add text annotations (Python) -

output file.pdf (605 KB)

p-19068373RayLodge180116.pdf (673 KB)

If you open the input file in other PDF readers, then you will see that there is an annotation already.

You can detect this using our SDK, see the annotation test sample on how to parse existing annotations.

Hi Ryan, I opened the PDF document using Chrome PDF Viewer and Acrobat Reader as well. Both of them didn’t show the annotation.

Attached is a screenshot of what I see.

Screen Shot 2016-06-17 at 3.39.44 PM.jpg

If you zoom out in Acrobat the annotation does appear, just off of the page and to the left.

As for Chrome, this is actually a “bug” in Chrome, where it only renders annotations with a content stream, which this one doesn’t. I added a content stream to the PDF, and Chrome displays the annotation the same as PDFTron and Foxit.