We are attempting to follow this method for displaying PDFs and images, but we are finding that this appears to only work when the file sizes are 1MB or less at least in Chrome and Edge. A 2MB pdf file, for example, yields a blank preview window. Any workarounds you may suggest? Is this your experience as well?
Hi Lennie Sutton, how are you?
First, thank you for your contribution and for pointing out this limitation in the component.
The component actually has a limitation on file size. We've updated our component's documentation and pointed out this limitation.
For knowledge:
Files up to 1MB load for sure in all browsers. Files above 1MB depend on the client's machine variables (x64/x32), for example, which browser and version the user is using, how much memory he has on the local machine, because how we use the IFRAME technique behind the scenes to load the document, the IFRAME inherits the characteristics of the browser that is opening the document.
And each browser has a certain limitation.
You can see more information at the link:
https://stackoverflow.com/questions/695151/data-protocol-url-size-limitations