• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

PDF Embed API:Annotation not visible when annoation tool bar is disabled

Community Beginner ,
Jun 08, 2021 Jun 08, 2021

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 

 

  1. If annotations APIs are enabled (enableAnnotationAPIs: true) and includePDFAnnotations: false, then:                     - The PDF Embed API does not display existing annotations, but will display new ones.  -
    1.                -  Any annotation added or updated either from the UI or API is not saved to the PDF buffer; therefore, no Save button appears in the top bar.

 

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_FAILURE
 Uncaught (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

 

 

 

Views

281

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 09, 2021 Jun 09, 2021

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources