Participant
November 20, 2020
Answered
enableAnnotationAPIs disables the custom text button
- November 20, 2020
- 2 replies
- 1149 views
Hi,
When I enable the "enableAnnotationAPIs" the add text comment button disappears from the UI. see attached image.
my code is attached
const viewerConfig = {
// enableAnnotationAPIs: true,
showLeftHandPanel: true,
showDownloadPDF: true,
showPrintPDF: true,
showPageControls: true,
dockPageControls: true,
defaultViewMode: ""
};
$timeout(function () {
var adobeDCView = new AdobeDC.View({
clientId: clientID,
divId: "adobe-dc-view-desktop"
});
var previewFilePromise = adobeDCView.previewFile({
content: {
location: {
url: $scope.pdfsrc
}
},
metaData: {
fileName: $rootScope.pdfName,
id: $rootScope.pdfID
}
}, viewerConfig);
const eventOptions = {
listenOn: [
"ANNOTATION_ADDED",
"ANNOTATION_CLICKED",
"ANNOTATION_DELETED",
"ANNOTATION_UPDATED"
]
};
const customFlags = {
showToolsOnTextSelection: true
};
// add save functionality here.
previewFilePromise.then(adobeViewer => {
adobeViewer.getAnnotationManager().then(annotationManager => {
annotationManager.setConfig(customFlags)
.then(() => console.log("Success"))
.catch(error => console.log(error));
annotationManager.registerEventListener(
function (event) {
console.log(event.type, event.data)
}, eventOptions);
});
});
}, 1300);
