Copy link to clipboard
Copied
Greetings!
I am having trouble getting the PDF embed API to work on my site. I keep encountering the message "File Preview Not Available" with any PDF file I try. The domain is a test site I created with Weebly https://corporatesampleintranetpage.weebly.com/.
The code I am using is:
<div id="adobe-dc-view"></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: "<98a6ee14c3d64f3a8eae67ddf3534fc1>", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "https://documentcloud.adobe.com/link/documents/files/sample.pdf"}},
metaData:{fileName: "ACORD.pdf"}
}, {});
});
</script>
Any and all help is VERY MUCH APPRECIATED!
Beth
Copy link to clipboard
Copied
The URL you are pointing to is not a direct link to a PDF. It is a link to a view of the PDF file stored in Document Cloud. At the time of this writing, there is no method of accessing the bytes of a PDF or creating a direct link to a PDF stored in Adobe Document Cloud. You'll need to host your PDF file somewhere else.
Copy link to clipboard
Copied
Beth you have enclosed your client ID in < >
<98a6ee14c3d64f3a8eae67ddf3534fc1>
It should be without the < >, like this:
98a6ee14c3d64f3a8eae67ddf3534fc1