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

File preview error - Got it working for one and not the other .. Need Help.

New Here ,
Jul 08, 2022 Jul 08, 2022

Copy link to clipboard

Copied

Hello,

I have a strange file preview error I do not understand. 

  1. https://marketing.marketingguys.nl/acton/media/7349/acton-hosted-pdf
    PDF file can be viewed with PDF Embed API. PDF file hosted on same server as webpage
  2. https://marketing.marketingguys.nl/acton/media/7349/external-hosted-pdf
    PDF file can be viewed with PDF Embed API. PDF url from Adobe demo
  3. https://marketing.marketingguys.nl/acton/media/7349/external-not-working
    PDF file gives file preview error with PDF Embed API. PDF file hosted on our company website server (marketingguys.com)
  4. https://marketingguys.com/nl/knowledge/whitepaper-sales-en-marketing-alignment-whitepaper/
    Same PDF file as number 3,  but webpages hosted on marketingguys.com, it works.

 

Why does the 2nd one work and the 3rd one not?

TOPICS
PDF Embed API

Views

37

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 ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

Hi there,

I think this has to do with CORS. When I open your "external-not-working" link, in the browser console I see this error:

Access to XMLHttpRequest at 'https://marketingguys.com/wp-content/uploads/2022/07/whitepaper-marketing-sales-alignment.pdf' from origin 'https://marketing.marketingguys.nl' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

There are browser add-ons that can help you get around such CORS errors.

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 ,
Jul 14, 2022 Jul 14, 2022

Copy link to clipboard

Copied

Hi Kyle,

Thanks for the reply. I see the CORS error. But why does it appear on https://marketing.marketingguys.nl/acton/media/7349/external-not-working

and not on below page?

https://marketing.marketingguys.nl/acton/media/7349/external-hosted-pdf
Both directing to PDF file which is hosted somewhere else.

Very strange.

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 ,
Jul 14, 2022 Jul 14, 2022

Copy link to clipboard

Copied

LATEST

The difference is likely that the one is hosted on Adobe domain, whereas the other is your personal webserver. You may be able to configure your server to allow this type of cross-domain request.

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