Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Please provide more information about the error that you are getting for us to help you.
Copy link to clipboard
Copied
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,
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Hi Raju,
Can you please share the code snippet you used for this DivId error.?
_iframeele.contentWindow.AdobeDC.View(...)