This works in root <script src="https://documentservices.adobe.com/view-sdk/viewer.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({clientId: "Credential", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "images/LM_12Page_Folder.pdf"}},
metaData:{fileName: "LM_12Page_Folder.pdf"}
}, {defaultViewMode: "FIT_PAGE", showAnnotationTools: false, showDownloadPDF: false,
showPrintPDF: false});
});
</script> This fails when the HTML is in a subdirectory I have also tried ../images/LM_12Page_Folder.pdf as the location <script src="https://documentservices.adobe.com/view-sdk/viewer.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({clientId: "Credential", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "http://www.domain.com/images/LM_12Page_Folder.pdf"}},
metaData:{fileName: LM_12Page_Folder.pdf"}
}, {defaultViewMode: "FIT_PAGE", showAnnotationTools: false, showDownloadPDF: false,
showPrintPDF: false});
});
</script>
... View more