Copy link to clipboard
Copied
Code
<script src="https://documentservices.adobe.com/view-sdk/viewer.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function () {
document.getElementById("CV").addEventListener("click", function () {
var adobeDCView = new AdobeDC.View({
clientId: "203e1bacaee04c58b0e7c0ffeddfb6e7",
});
adobeDCView.previewFile(
{
content: {
location: {
url: "https://dhanurjan.ga/wp-content/uploads/2022/10/Dhanurjan-CV.pdf",
},
},
metaData: { fileName: "Dhanurjan-CV.pdf" },
},
{ embedMode: "LIGHT_BOX" }
);
});
});
</script>
I have a button with ID = CV.
When I click it pdf opens. But it not working in mobile browsers.
Website URL: dhanurjan.ga
Turned off minify JavaScript option in the wp-rocket cache plugin. After that everything works fine.
Copy link to clipboard
Copied
Getting this error only in mobile view.
Copy link to clipboard
Copied
Turned off minify JavaScript option in the wp-rocket cache plugin. After that everything works fine.