Copy link to clipboard
Copied
Hello -
On initial load of the document, which is embedded into our application, we get a brief warning message that Some Features May Not Work. The error comes up for a few seconds and then goes away, and the document loads successfully after that. Our documents are loaded through a React viewer that takes some parameters, sends it to our server which creates and sends back a redis key. The redis key is used to call a URL that loads the document, on which step we are getting the error message.
Is there a way to supress this warning or something else going on?
Copy link to clipboard
Copied
Can you share the PDF file in question?
Copy link to clipboard
Copied
I cannot due to privacy, and it does not happen with just one specific PDF file. It happens with any of them.
Copy link to clipboard
Copied
Ok - Then my recommendation is to not load the PDF file via a URL. Instead, fetch the PDF, and pass it to the "content" property as a Promise that resolves to a bytearray.
Let me know if that works around the error you're seeing from loading a URL.
Copy link to clipboard
Copied
I can make an attempt at that, but I don't know if that's possible due to the structure of this functionality in the application and the way our documents are stored. We are getting them from a python server. Will let you know though.
Copy link to clipboard
Copied
Right. So if fetch can't get the PDF from the URL, you'll have a better idea as to why Embed API can't. The fetch will give you more useful error messaging about just getting the bytes of the file. But once you have the bytes, you can easily convert it to a bytearray and load it into Embed API.