Adobe Embed Api With Different Domain / PDF From third parties

New Here ,
Aug 22, 2022 Aug 22, 2022

Copy link to clipboard

Copied

Hi, I'm having trouble displaying a pdf on my web page.

Here is the background:
- My website has the web domain example.com
- But my pdf is in google storage which is of course a different domain. (storage.googleapis.com).

Problem:
- I can't run adobe embed api with the above background.

Question:
- Is it possible for me to run adobe embed api with a different domain as in the background above?
- Is there a workaround for pdfs obtained from third parties such as Google Storage or AWS S3?

TOPICS
How to , PDF Embed API , PDF Services API

Views

60

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

Community Expert , Aug 23, 2022 Aug 23, 2022

You just need to have a direct URL to the PDF and to have CORS set up on the server that the PDF resides on to allow it. Alternatively, you can fetch the PDF from the server and pass it to Embed API via a Promise that resolves to a ByteArray. 

Likes

Translate

Translate
Community Expert ,
Aug 23, 2022 Aug 23, 2022

Copy link to clipboard

Copied

You just need to have a direct URL to the PDF and to have CORS set up on the server that the PDF resides on to allow it. Alternatively, you can fetch the PDF from the server and pass it to Embed API via a Promise that resolves to a ByteArray. 

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 ,
Aug 25, 2022 Aug 25, 2022

Copy link to clipboard

Copied

Thanks for the answer but do you know how to enabling CORS on Google Cloud Storage?
I've been looking for this in a whole day but still got nothing.
Thankyou!

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 ,
Aug 25, 2022 Aug 25, 2022

Copy link to clipboard

Copied

LATEST

I think i found a solution.
Here's the configuration cors for google cloud storage:
https://cloud.google.com/storage/docs/configuring-cors

It solved, Thankyou!

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