Skip to main content
Participating Frequently
Jan 31, 2024 11:19 AM UTC
Question

disable comments sidebar -PDF Embed API

I want to disable comments in sidebar

Setting showAnnotationTools: false solves it but it disables PDF annotations altogether, I need a way to disable the comments sidebar only. 
is there a way to do this?

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

5 replies

Raymond Camden
Community Manager
Community Manager
Feb 1, 2024 2:55 PM UTC

Looking at the docs in regards to customization (https://developer.adobe.com/document-services/docs/overview/pdf-embed-api/howtos_ui/), I don't believe so, but you should check the doc there to be sure.

Translate
Participating Frequently
Feb 4, 2024 7:56 AM UTC

@Raymond Camden I checked and tried this code but it doesn't work 
const customFlags = {
showToolbar: true,
showCommentsPanel: false,
showToolsOnTextSelection: false,
downloadWithAnnotations: false,
printWithAnnotations: false
}

adobeDCView.previewFile({
metaData:{fileName: "Bodea Brochure.pdf"}
}, {
}).then(adobeViewer => {
   adobeViewer.getAnnotationManager().then(annotationManager => {
 
       annotationManager.setConfig({ showCommentsPanel: false}) .then(() => console.log("Success"))
           .catch(error => console.log(error));
   });
})
Translate
Raymond Camden
Community Manager
Community Manager
Feb 5, 2024 2:44 PM UTC

In the second argument to previewFile, which you have empty, add:

enableAnnotationAPIs: true

 

You can see this here, https://codepen.io/cfjedimaster/pen/NWJzgva?editors=1011

Translate