Copy link to clipboard
Copied
According to the documentation - if enableAnnotationAPIs is true then I should be able to see annotations that were added programmatically
However the only way I can see annotations that were added programatically is if showAnnotationTools is enabled - however I don't want the annotation tool bar to be enabled because I don't want users to manually create/alter annotations- I should be able to see annotations that were added programatically without enabling the annotation tool bar. I get the following error in the javascript
status code 403, net::ERR_HTTP_RESPONSE_CODE_FAILUREUncaught (in promise) Annotation APIs not enabled.My code:
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCViewer = new AdobeDC.View({clientId: "f040089fe9704ba9966d0761988a6708", divId: "adobe-dc-view"});
var previewFilePromise = adobeDCViewer.previewFile({
content: {location: {url: "db2.pdf"}},
metaData: {fileName: "msgLogpdf", id: "77c6fa5d-6d74-4104-8349-657c8411a834"}
},
{
enableAnnotationAPIs: true,
includePDFAnnotations: false,
showAnnotationTools:false,
enableFormFilling:false,
showDownloadPDF:false,
showPrintPDF:false
}) ;
My browser is IE Edge and Operating System is windows 10
Copy link to clipboard
Copied
Thanks for using PDF Embed API.
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.