I am having an issue with displaying pdfs inline in a shiny app using shinyproxy or displaying pdfs in a new tab. The issue is particularly frustrating because the pdf downloads fine, but is not being shown correctly. The correct number of pages is shown with the pdf, but no content.
I have been able to somewhat isolate the issue to ShinyProxy iframes. EG if I use the app_direct endpoint rather than the app endpoint the pdf renders.
This was fabulous, except now we don’t have those nice things like error messages and loading spinners.
Here is a tangentially related thread that got me to thinking about using app_direct in the first place:
Other unsuccessful attempts include setting pdf headers and mimetypes, using the application.yml or removing active content. I was able to reproduce the same headers that other pdf websites use, however these did not impact the problem like using the app_direct endpoint.