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?
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.
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.
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!
Copy link to clipboard
Copied
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!