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.
Hello,
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.
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.
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()
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.
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: