Skip to main content
Participant
July 22, 2021
Question

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

  • July 22, 2021
  • 1 reply
  • 300 views

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 has been closed for replies.

1 reply

Adobe Employee
August 2, 2021

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!