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

Embed PDF API Error Message.

Participant ,
Jan 01, 2022 Jan 01, 2022

Copy link to clipboard

Copied

Hello,

I am trying to display a PDF online via my website/web domain but can't seem to make it work. I have tried the code shared by Adobe and have also installed a SSL certificate thinking perhaps this was the reason it wasn't working.

Both the index file and PDF file are both at the root level of my directory, and are the only two files in it. As I enter my web address it starts to load the file. It then displays the first page of the PDF file briefly and it is quickly replaced by the following message in a white rectangular box in the middle of the browser window:

 

"File preview not available

This application domain (https://www.domain.com( is not authorized to use the provided PDF Embed API Client ID."

 

This is what displays on the JavaScript Console:

 

Successfuly preconnected to https://use.typekit.net/

Successfuly preconnected to https://p.typekit.net/

Unrecognized Content-Security-Policy directive 'worker-src'.

Origin https://www.domain.com is not allowed by Access-Control-Allow-Origin.

Fetch API cannot load https://viewlicense.adobe.io/viewsdklicense/jwt due to access control checks.

Failed to load resource: Origin https://www.domain.com is not allowed by Access-Control-Allow-Origin.

 

Can anyone please help? I really need to make this work and have tried just about everything I can think of without any success.

Thank you.

 

TOPICS
PDF Embed API

Views

705

Likes

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

correct answers 1 Correct answer

Adobe Employee , Jan 07, 2022 Jan 07, 2022

As a followup to this, the issue was that he took our sample code:

var adobeDCView = new AdobeDC.View({clientId: "<YOUR_CLIENT_ID>", divId: "adobe-dc-view"});

And replaced "YOUR_CLIENT_ID", but left in the < and >. So for example:

var adobeDCView = new AdobeDC.View({clientId: "<a real id here, but inside brackets>", divId: "adobe-dc-view"});

The solution is to ensure you remove the < and >. I've worried about this mistake in the past, so I'm filing a bug to our docs to see about changing it. 

Likes

Translate

Translate
Adobe Employee ,
Jan 06, 2022 Jan 06, 2022

Copy link to clipboard

Copied

Did you get a key that is tied to your domain? I assume it isn't domain.com.

Likes

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
Participant ,
Jan 06, 2022 Jan 06, 2022

Copy link to clipboard

Copied

Hi Raymond,

Yes, I did. I created my credentials entering my domain name along with a username and in return received a key from Adobe. 

You are right. Domain is not the name but I felt it may not be secure or appropriate to share my real domain name here.

Any ideas as to what might be causing this behavior?

Thank you!

Likes

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
Adobe Employee ,
Jan 07, 2022 Jan 07, 2022

Copy link to clipboard

Copied

I assume you are also on https, and the subdomain matches? Ie, you told our console, "I want to use www.foo.com", and you are testing on https://www.foo.com, not foo.com?

Likes

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
Participant ,
Jan 07, 2022 Jan 07, 2022

Copy link to clipboard

Copied

Hi Raymond,

 

I am testing on https://www.foo.com/test. When I created my credentials I entered the domain name as www.foo.com. I tried to enter https://www.foo.com as the domain name but Adobe returns a message stating this domain name is invalid.

Likes

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
Adobe Employee ,
Jan 07, 2022 Jan 07, 2022

Copy link to clipboard

Copied

Ok, just ensuring it wasn't something simple. At this point, I'm not sure. Would you feel comfortable emailing me directly, sharing the URL, and I can take a look?

Likes

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
Participant ,
Jan 07, 2022 Jan 07, 2022

Copy link to clipboard

Copied

Hi Raymond,

Thank you very much for your help.

Absolutely. I certainly feel comfortable e-mailing you and sharing the information you need. What e-mail should I use to send you the information you need?

 

Likes

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
Adobe Employee ,
Jan 07, 2022 Jan 07, 2022

Copy link to clipboard

Copied

jedimaster@adobe.com will reach me.

Likes

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
Adobe Employee ,
Jan 07, 2022 Jan 07, 2022

Copy link to clipboard

Copied

As a followup to this, the issue was that he took our sample code:

var adobeDCView = new AdobeDC.View({clientId: "<YOUR_CLIENT_ID>", divId: "adobe-dc-view"});

And replaced "YOUR_CLIENT_ID", but left in the < and >. So for example:

var adobeDCView = new AdobeDC.View({clientId: "<a real id here, but inside brackets>", divId: "adobe-dc-view"});

The solution is to ensure you remove the < and >. I've worried about this mistake in the past, so I'm filing a bug to our docs to see about changing it. 

Likes

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
Participant ,
Jan 07, 2022 Jan 07, 2022

Copy link to clipboard

Copied

Hi Raymond,

Again, I can't thank you enough. I had been trying to do this for quite some time but couldn't get it right. You took one look at the code and immediately identified the problem.

I am incredibly enthusiastic about this solution. I had been working with Flipbooks for some time but was very unhappy with their quality. They never looked the same way and with the same quality as the PDF from which they were converted.

The ability to use PDFs online will be a game changer for many out there who wish to display their documents or information online but don't want to be involved with or don't have the knowledge to do web design.

My only suggestion, as I have already mentioned, is for Adobe to add the capability to view documents as a two-page spread instead of a single-page document so users can create a similar experience to that of using a flipbook (now that Flash is gone and many don't want to use flipbooks based on HTML5 Adobe PDF Embed API may easily take their place).

Thank you again, Raymond.

Likes

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 ,
May 30, 2022 May 30, 2022

Copy link to clipboard

Copied

Raymond,

I came across this thread and am having the same issue with the following error message:
File Preview Error. File preview is not available, please reload and try again.

I'm using the PDF Embed API. I have a Client API Embed key and have tied it to the appropriate website. I do not have the < > surrounding my ID. I can view the PDF perfectly if i use the full path in a separate window, however it will not load within the webpage itself.

 

I'd be happy to email you my website and code snippets if that would help. Thanks in advance for your time!

Likes

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
Adobe Employee ,
May 31, 2022 May 31, 2022

Copy link to clipboard

Copied

Sure, drop me a line at jedimaster@adobe.com.

Likes

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
Adobe Employee ,
May 31, 2022 May 31, 2022

Copy link to clipboard

Copied

FYI for folks who want to know the resolution: When the user above set up their key, they set it up for (as an example), www.raymondcamden.com. An error was thrown when hitting raymondcamden.com. I told them they can either _always_ use www and their domain, OR make a new credential and specify the host w/o www. Then it would work with or without. 

Likes

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 ,
May 31, 2022 May 31, 2022

Copy link to clipboard

Copied

LATEST

Raymond was a huge help in determining this issue! I was going nuts trying to figure out why it wouldn't work.

Likes

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