Skip to main content
Participant
September 15, 2021
Question

Adobe PDF Embed not populating on front end... but showing full preview on backend

  • September 15, 2021
  • 0 replies
  • 430 views

Hello!

 

I'm using Adobe PDF Embed for the first time. I've gone through the proper steps, and using my code in WP Bakery on the backend, I manage to get a preview of my PDF. Also upon looking at the preview page, I can see my PDF.

 

When I published it, I could see the PDF momentarily.. until I refreshed the page, or looked up the page again. It's completely gone. The code seems to be working, but something is stopping it from fully and consistently populating on my site? Could it be a plugin I'm using?

 

Thanks.

 

This is the code I'm using (client ID changed for privacy reasons).

<div id="adobe-dc-view" style="width: 800px;"></div>
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({clientId: "XXXXXXXXXXXX", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "https://www.gwenadora.com/wp-content/uploads/2021/09/GwenAdora_MediaKit_example.pdf"}},
metaData:{fileName: "GwenAdora_MediaKit_example.pdf"}
}, {embedMode: "IN_LINE"});
});
</script>

 

 

 

This topic has been closed for replies.