Skip to main content
Participant
Jul 22, 2021 7:10 AM UTC
Question

Show Annotations via api and not allow end user to add annotations

I want to add some annotations to my PDF document via the APIs. Along with that I also want that the end-user should not add any annotations to the Document. 

enableAnnotationAPIs: true,
includePDFAnnotations:true,

But the showAnnotationTools setting should be true for both of these to work. Is there a way to handle this?

TL;DR
add annotations via API but not show the annotations tools 

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Adobe Employee
Aug 2, 2021 4:25 PM UTC

showAnnotationTools cannot be set to false if you want to use annotation APIs.

 

But you can use the setConfig API which supports certain special UI configurations.

- showToolbar: Control the visibility of the commenting tools in the top bar

- showToolsOnTextSelection: Control the visibility of the commenting tools which get displayed after text selection.

 

For more details, please see the section Comments and Markup -> APIs to control UI configurations -> setConfig API in the official documentation. Hope this helps!

Translate