Annotations not getting rendered

Which product are you using?
PDF.js Express Plus

PDF.js Express Version
Core version: “8.7.4”
UI version: “8.7.0”

Detailed description of issue
Annotations added are not being rendered

Link to document
DT 0337 REV C P ID S .pdf

Annotations File
XDFD (8.9 KB)

Above attached is the XML data that has the details of all the annotations, along with a link to the document that can be downloaded. Except for the first annotation in the list - none of the other annotations are being rendered.

This is an urgent critical issue. Your swift response will be highly appreciated.

Hi there,

Using the provided XFDF data, importing it comes with the following issues in the console:

Could you please share how you generated those annotations and how you exported them?

Best regards,
Kevin Kim

Of all the annotations only the first one gets rendered in my document. After the first item - none of the items are rendered. I tried comparing the two annotations yet nothing seems to be odd or out of the picture here.

Sharing the code will be difficult since the code is distributed to accommodate our use case.

Can we have a call ASAP to check the code?

Hi there,

Could you please share your email and availability between 8AM - 2PM PST?

Best regards,
Kevin Kim

We can have a call right away!

Hi Kevin,
Removing the <contents> and <trn-custom-data> from all annotations works. All my annotations are now being rendered.

However, although I agree with the fact that PDFJS.Express is built on top of an open-source library - will there be no support from the Dev team on this matter? setContents is a method provided by the tool and setting some data affects the rendering of annotations.

Just for your closure - Since I already have comments stored separately (along with the annotations XML), on hover I am now showing the contents from outside instead of the contents inside the annotation XML object.

Hi there,

Thank you for the update,

We will add this issue to our backlog for the product team to review.

Best regards,
Kevin Kim

I noticed that since the <contents> is removed, the print report no longer shows the “content” of the annotation. Is there a way the content can be loaded into the annotation before print?

Can you please share a screenshot of what you mean by the print report and the contents?
If you are printing via a button or an event, you can try calling setContents on the annotation before calling instance.UI.print()

Best regards,
Kevin Kim

This works - setContent() sets the content beforePrint. Also is there a way to update the author of an annotation? The idea is for some cases I need to hide the annotation author while show in some cases.

Hi there,

The .Author attribute of the annotation name will show you who the author of that annotation is. If you want to more explicitly set annotation authors, you can use setCustomData as shown in this guide:

Best regards,
Kevin Kim