According to the documentation - if enableAnnotationAPIs is true then I should be able to see annotations that were added programmatically
If annotations APIs are enabled (enableAnnotationAPIs:true) andincludePDFAnnotations:false, then: - The PDF Embed API does not display existing annotations, but will display new ones. -
- Any annotation added or updated either from the UI or API is not saved to the PDF buffer; therefore, noSavebutton appears in the top bar.
status code 403, net::ERR_HTTP_RESPONSE_CODE_FAILURE
Uncaught (in promise) Annotation APIs not enabled.
Annotation APIs won't work if showAnnotationTools is set to false. If you wish to hide the annotation tool bar, then you can set the flag showToolbar to false and pass to setConfig API. There is also another flag showToolsOnTextSelection which can be used to hide the toolbar which appears on text selection.
Please see the section Comments and Markup -> APIs to control UI configurations -> setConfig API, in the official documentation.
Please note that even though this hides the annotation toolbar, users will still be able to update the annotations (text, color, etc) from the UI.