0
Setting up Adobe PDF Embed SDK But in Chrome getting Preview Error
New Here
,
/t5/acrobat-services-api-discussions/setting-up-adobe-pdf-embed-sdk-but-in-chrome-getting-preview-error/td-p/12115382
Jun 15, 2021
Jun 15, 2021
Copy link to clipboard
Copied
Hi
I'm trying to use 'Adobe View' to embed a PDF on a webpage.
I've followed API documentation to set up.
here is my code:
<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: "062bc24ed9d8496188760affc1770a9b", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "https://encyclical-ball.000webhostapp.com/PDF-Forms/Fomema_Amendment_Form.pdf"}},
metaData:{fileName: "Fomema Amendment Form"}
}, {defaultViewMode: "FIT_WIDTH"});
});
</script>
the code is working fine in Microsoft Edge, Internet Explorer & Mozilla Firefox but not working in Google Chrome.
Chrome Error:
"File preview not available, please reload to try again."
Is there any idea to fix the error?
TOPICS
Document Generation API
,
PDF Embed API
,
PDF Services API
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
LATEST
/t5/acrobat-services-api-discussions/setting-up-adobe-pdf-embed-sdk-but-in-chrome-getting-preview-error/m-p/12119811#M2013
Jun 17, 2021
Jun 17, 2021
Copy link to clipboard
Copied
Hi,
I can preview the file using provided snippet in chrome 91. Could you please share screen shot of error and chrome version you are using? Also, are you running this on a local server or opening HTML file dirctly in browser?
Thanks!
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

