Copy link to clipboard
Copied
Hey there,
I have embedded my PDF with the PDF API Script into my wordpress Website and I have the WP-Rocket Cache Plugin. I am facing two major some issues that I need to have solved.
At first, I have the API Embed Script integrated like this in the body of the website:
<div id="adobe-dc-view" style="width: 100%;"></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: "6b0c4686e1b842909660a955344f3322", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "https://my-ul/wp-content/uploads/YYYY/MM/my-ebook.pdf"}},
metaData:{fileName: "my-ebook.pdf"}
}, {embedMode: "IN_LINE", showDownloadPDF: false, showPrintPDF: false});
});
</script>
So I have the following issues here:
1. The PDF I am embedding won't display, when the WP-Rocket Cache Plugin is activated. I get a 404 error calling the script in the body of the DOM, together with the code that is provided by the PDF API Embed solution:
2. When the WP-Rocket Cache Plugin is deactivated, I see the PDF, BUT I get a bunch of parsing violation and error messages:
I need the Cache Plugin to improve the page speed. What should I do?
Thanks for your fast support and your time upfront.
Have something to add?