Answered
Adobe pdf embed api lightbox not working in mobile browsers
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
