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

PDF Embed API, I need to add a button on top of the UI which was rendered by the library

Community Beginner ,
Nov 08, 2021 Nov 08, 2021

Copy link to clipboard

Copied

Hi,

 

We are using Adobe PDF Embed API, amazing free library! We have one problem.

We are showing all the pdf in read only mode without annotation panel. We need to put a button beside the document name when the library finishes loading the file.

 

We have the our div, but it can not be added to the UI using the `insertAdjacentElement` method! we are getting the span element which contains `document name` and we are trying to add our div beside it!

 

It fails because the content which was loaded by the adobe library made browser to not insert the content in the DOM and that is why we receive null!

 

If we open the developer console and inspect the content that adobe inserted for the pdf viewer then it will not be null.

 

I suspect that it is because of the `role=presentation` of the content, but how we can get the pdf embed library to load the content into the dom so we will have access in Angular to add our div?

TOPICS
PDF Embed API

Views

92

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 ,
Nov 11, 2021 Nov 11, 2021

Copy link to clipboard

Copied

Is there a specificreason you need the button to appear beside the name?

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 Beginner ,
Nov 11, 2021 Nov 11, 2021

Copy link to clipboard

Copied

LATEST

We have to open the pdf file in the read only mode without the annotation panel, then we need this button to be shown on the top part (preferably beside the name) with the label `Edit` and when user click on th Edit button, we will refresh the viewer with the annotations tools.

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