Do not generate comments when adding annotations

Which product are you using?
PDF.js Express Plus

PDF.js Express Version
UI version: 8.4.1
Core version: 8.4.0
Build: NC8xMi8yMDIyfGI0OTc1YjFjZA==
WebViewer Server: false
Full API: false

Detailed description of issue
I would like to create annotations without generating these comments:

It’s not just about hiding these comments from PDF.js Express, because they also appear in other PDF readers when merging and downloading them. I would really like not to generate them.

Thanks in advance,
Vicente!

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi Vicente,

Just confirming that you have found a fix for this issue.

Best Regards,
Zach Serviss
Web Development Support Engineer
PDFTron Systems, Inc.

Hello, Zach.

No, I didn’t find a solution. I thought so, but I was just filtering the comments, not deleting them.
That’s why I deleted my previous post.

Thanks,
Vicente!

Hi Vincente,

After doing some testing I can confirm that setCustomNoteFilter() will only hide notes appearing within our viewer.

A work around to disabling notes from appearing in other PDF viewers would be to merge annotations into the document. This however would remove any edibility to the annotations as they would be essentially baked into the PDF. This involves calling the REST API.

Here is a guide on this.

Just for a little more information, WebViewer can flatten a document without a REST API call.

Best Regards,
Zach Serviss
Web Development Support Engineer
PDFTron Systems, Inc.

Hi, Zach.

I actually already merged the document by calling the REST API. It was exactly after merging the annotations into the document and downloading it that I first saw the comments. So that didn’t help, unfortunately.

Is there a way to add annotation (StampAnnotation, FreeTextAnnotation, FreeHandAnnotation) without creating these comments?

Thanks,
Vicente!

Hi Vincente,

Unfortunately there is no way to stop the creation of these ‘comments’.

What we are seeing in that side panel is the actual annotation that was created. There is no comment that is actually created, it is just the reference to the annotation.

Could you tell me your specific use case? The easiest work around is to just not show the comment panel.

Best Regards,
Zach Serviss
Web Development Support Engineer
PDFTron Systems, Inc.

Hello, Zach!

I already hide the comment panel in PDF.js Express, but these comments appear in other PDF readers like Adobe.

After merging the document there are annotations that I want to keep them and also a lot of comments that I want to remove them.

Thanks,
Vicente!

Thanks Vincente,

I see. In Adobe when adding annotations, comments on the annotation appear in the comment panel as well.

I would recommend using PDFTron’s WebViewer to flatten annotations so they become part of the PDF and any annotation metadata is lost.

Here is a guide on migrating.

Best Regards,
Zach Serviss
Web Development Support Engineer
PDFTron Systems, Inc.

Hello, Zach.

If the only solution is to use PDFTron, you can close this issue.

Thank you for your help,
Vicente.