File Preview Error: Demo works but new PDF does not
Hey all,
Cool tool. But can't get it to run with my own PDF. Works fine with demo PDF from tool.. so know I have the ClientID and credentials setup.
Works: http://c19rh.org/assets/1/yes.html
Error: http://c19rh.org/assets/1/no.html
Source File reference in no.html: https://c19rh.org/smx.pdf
What am I missing? Thanks!
<!-- Works fine with demo PDF from adobe.com -->
<div id="adobe-dc-view" style="height: 760px; width: 800px;"></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: "d6b9af64d40d44bcafe797e71085ecc6", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "https://documentcloud.adobe.com/view-sdk-demo/PDFs/Summary.pdf"}},
metaData:{fileName: "Summary.pdf"}
}, {embedMode: "SIZED_CONTAINER"});
});
</script>
<!-- Swapped out location URL and file name - get "file preview error".
<div id="adobe-dc-view" style="height: 760px; width: 800px;"></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: "d6b9af64d40d44bcafe797e71085ecc6", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "https://c19rh.org/smx.pdf"}},
metaData:{fileName: "smx.pdf"}
}, {embedMode: "SIZED_CONTAINER"});
});
</script>
-->
