Skip to main content
Participant
July 3, 2020
Answered

Embed PDFs in webpages using Adobe View not working

  • July 3, 2020
  • 4 replies
  • 4444 views

Hi there,

I'm trying to use 'Adobe View' to embed a PDF on a webpage. 

I've followed the process detailed on this page, which leads me to the 'Document Cloud View SDK Demo' page, then I can copy the code generated.

After pasting this into my webpage and previewing it, I can see the Adobe hosted PDF fine, however when I replace the URL under content option with the URL to my own PDF, then reload my web page, I recieve the following error message... "File preview error. File preview not available, please reload to try again"

 

I've tried adding other PDF's hosted in other locations but to no avail. 

Does anyone know how I use my own PDF?

 

I've attached some screen shots of the code working, albeit with the Adobe Preview PDF, and another when it fails after I try to use my own hosted PDF. 

This topic has been closed for replies.
Correct answer Shubhanshu Dixit

Hi, Thanks for using View SDK, There might be CORS related problem with the PDF URL you are providing. Could you please go through the official documentation, and look for Cross-origin resource sharing under section "Passing file content"?

4 replies

Participant
September 26, 2021

I have the same problem with a bit of a twist. 

 

It works fine on my mac using safari, works fine on my iphone, my android phone. Deployed it and my windows customers are all getting the preview error.

Adobe Employee
September 27, 2021

Can you share your website link so we can take a look?

Participant
September 28, 2021
Participant
February 4, 2021

Is there any way to use the Adobe Embed API on a Google Blogger hosted blog?  I have trouble seeing any way in which I can host the pdf on the blog for the API to access.  Thanks.

Shubhanshu DixitCorrect answer
Adobe Employee
July 6, 2020

Hi, Thanks for using View SDK, There might be CORS related problem with the PDF URL you are providing. Could you please go through the official documentation, and look for Cross-origin resource sharing under section "Passing file content"?

SebDrewAuthor
Participant
July 6, 2020

Hi Shubhanshu, 

Thank you for your reply and the link to the documentation.
I can now see that for me the issue is that the PDF from my client is hosted on another domain and it is indeed causing an issue as it's not on the same domain as my webpage. I will try to upload the PDF to my website and try again. 

Thanks, Seb.

Participant
July 6, 2020

I have the exact same problem. The code generated by the demo doesn't work except with the Adobe hosted PDF. I have used alternative coding using a separate js file and it works fine for the INLINE_VIEW only.

SebDrewAuthor
Participant
July 6, 2020

Hi duncara1, 

Thanks for your reply, glad to hear its not just me (...sort of!). Would you be able to share the code that worked for you please?