• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Setting up Adobe PDF Embed SDK But in Chrome getting Preview Error

New Here ,
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

Views

194

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 17, 2021 Jun 17, 2021

Copy link to clipboard

Copied

LATEST

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources