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

PDF Embed API - Annotation Toolabar disappears after pdf is loaded

New Here ,
Sep 29, 2022 Sep 29, 2022

Copy link to clipboard

Copied

Hello,

I'm currently implementing the Embed API. Everything is working as expected but after the pdf is opened, the annotation toolbar disappears. During the loading proccess of the viewer you can see the toolbar, but after the document is opened it fully disappers.

Nonetheless some annotation tools appear on right click or text selection, the toolbar on the left hand side is just gone. 

showAnnotationTools is set to true and the view is embedded in FULL_WINDOW mode, so it should be there normally. 

 

I would be very thankful for any suggestions.

TOPICS
PDF Embed API

Views

54

Likes

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
Community Expert ,
Sep 29, 2022 Sep 29, 2022

Copy link to clipboard

Copied

Can you share the PDF in question?

Likes

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
New Here ,
Sep 29, 2022 Sep 29, 2022

Copy link to clipboard

Copied

It happens for all PDFs I've tried so far (even in the Bodea Brochure from the code examples). So I don't think it has to do something with the file itself.

 

Likes

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
Community Expert ,
Sep 29, 2022 Sep 29, 2022

Copy link to clipboard

Copied

Interesting. I thought it might be because of security settings in the PDF. Can you share your code or link to the site? also, what device and browser are you seeing this on?

Likes

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
New Here ,
Sep 29, 2022 Sep 29, 2022

Copy link to clipboard

Copied

It is an angular / aspnet application. I've tried it in several browsers already (newest chrome, opera, edge) but the problem persists.

This is basically the .ts function for the view. I've commented everything else out (doc saving, events and so on) but it still won't work.

previewFileUsingFilePromise(divId: string, filePromise: Promise<string | ArrayBuffer>, fileName: string, fileID: string) {
        const previewConfig = {
            embedMode: 'FULL_WINDOW',
            defaultViewMode: 'FIT_WIDTH',
            includePDFAnnotations: true,
            showAnnotationTools: true
        }
        this.adobeDCView = new window.AdobeDC.View({
            clientId: 'xxx',                                                                               
            divId,
        });
        const view = this.adobeDCView.previewFile({
            content: {
                promise: filePromise,
            },
            metaData: {
                id: fileID,
                fileName: fileName
            }
        }, previewConfig);
return view;
}

 

This is the viewer during document loading for 1 second:

1.PNG

After the document is loaded:

2.PNG

But right clicking still shows some tools (and they are working):

3.PNG

Likes

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
New Here ,
Sep 30, 2022 Sep 30, 2022

Copy link to clipboard

Copied

LATEST

If I use <script src="https://documentcloud.adobe.com/view-sdk/main.js"></script> instead of <script src='https://documentservices.adobe.com/view-sdk/viewer.js'></script> the tools are being displayed correctly. 

Still I would prefer the UI of the viewer.js implementation...

Likes

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