Pdf viewer - image limit

pdfs over 4.5 to 5MB s do not seem to display in retool.

is it possible to increase the limit?

sometimes compression is an option, sometimes not.

Hey @lee_walter!

How exactly are you bringing the PDF into Retool and do you happen to be seeing any error messages either in the Retool debug console or in your browser console when it doesn't display?

Retool doesn't have a hard cap on the size of PDFs that can be loaded in, though converting them to base64 and loading the entire file into the model can cause things to slow down.

Another common stumbling block is if you haven't enabled access from your Retool domain in the CORS settings of the server where the PDF is hosted, in which case you should see something like this in your browser console:

Is it possible to change something on the ReTool side?
I faced the same problem, checked in the console. But I successfully opened the same PDF in a new tab with Link component.
The server not owned by Me and I cant change anything on the server side.
This is a link to Texas Instruments site



@alk0v my current thinking is the problem is with AWS Lambda rather than Retool

Hey folks!

Our engineering team is open to exploring options like setting up a proxy to fetch data for the PDF component that would help avoid CORS issues like these. We can let you know here when there's support!

In the meantime, using a link to open the pdf in a new window may be your best bet. For some small PDFs, you may be able to use a REST to fetch the base64 data directly and then pass that to the component with a data URI (e.g. data:application/pdf;base64,{{rest.data.base64Binary}}). At the moment this can come with a large performance cost though, as alluded to in the post above.

I get this error can't load pdf file now. Are you still resolving that bug ?

Hello @Huy_Tran, unfortunately, there are no updates yet. It helps to know it's impacting more people though and I can let you know here if it goes get fixed.

A solution which handles larger pdfs would be most helpful. occasionally we get up to 15MB,but 10 MB would be a good start