Skip to main content
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);

 

This topic has been closed for replies.
Correct answer brajeshk12751679

Hi,

 

Thank you for using Adobe Embed APIs. We haven't yet exposed Text annotation i.e. 'Add Text' tool via commenting APIs. That's the reason 'Add Text' tool is not available when you switch to API mode. It's however, available for consumption from standard commenting UX. We will roll out 'Add Text' annotation API shortly either this year itself or latest by January.

 

Thanks

2 replies

Participant
January 7, 2021

@brajeshk12751679 is there an update to the release date for Text annotation release 

brajeshk12751679Community ManagerCorrect answer
Community Manager
November 21, 2020

Hi,

 

Thank you for using Adobe Embed APIs. We haven't yet exposed Text annotation i.e. 'Add Text' tool via commenting APIs. That's the reason 'Add Text' tool is not available when you switch to API mode. It's however, available for consumption from standard commenting UX. We will roll out 'Add Text' annotation API shortly either this year itself or latest by January.

 

Thanks

Participant
November 22, 2020

Thanks for the prompt reply.