Copy link to clipboard
Copied
I am using the code snippet from the Document Service PDF embed API service, which is not working correctly on my end.
I am getting the following error:
Here is the code I am using:
<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: "6d2b4b4b70c64a0c9b71a2fed484e645"});
adobeDCView.previewFile({
content:{location: {url: "http://www.corclinic.com/downloads/COR_PhxMag_reprint_0408.pdf"}},
metaData:{fileName: "COR_PhxMag_reprint_0408.pdf"}
}, {embedMode: "LIGHT_BOX"});
});
</script>
Can the source PDF be from any website, or does it have to be stored on the adobe cloud for this work? Thank you
Copy link to clipboard
Copied
from the documentation...
Cross-origin resource sharing (CORS) issues may occur when you pass PDF content as a URL and the PDF Embed API needs to download the file from the provided location in order to render it. To avoid this situation, you can choose one of two methods: