PDF Embed API, I need to add a button on top of the UI which was rendered by the library
- November 8, 2021
- 1 reply
- 836 views
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?
