Skip to main content
Known Participant
July 20, 2020
Question

DivId content is not present in HTML document.

  • July 20, 2020
  • 1 reply
  • 1382 views

I am trying to use the PDF embed API but within a web component. When I put the id I get the above error. The id called content is withing the ShadowRoot of the web component. Is there any other way of passing the element where the previewFile can get rendered?

 

Thanks,

RmR

    This topic has been closed for replies.

    1 reply

    Community Manager
    July 31, 2020

    Please provide more information about the error that you are getting for us to help you.

    R.M.RAuthor
    Known Participant
    July 31, 2020

    Just yesterday I got this resolved but calling the function from within the iframe content window

    _iframeele.contentWindow.AdobeDC.View(...)

    Inside my component I create an iframe and inside it I call the viewsdk/main.js and refer to the iframe ele as above. I am just facing another problem which is posted in a new post where the PDF content is in base64 string.

     

    Thanks,

    Community Manager
    July 31, 2020

    Good to know that you were able to resolve the issue. PDF Embed API doesn't supprt base64 encoded content but you can still use it. We have posted a response on that post for how to make base64 encoded PDF work with Embed APIs.