I sometimes have graphics output (e.g. many graphs) that is best compiled and displayed in a pdf. I would like to generate such a pdf from within shiny, then display it in a new browser window / tab using the browser's default pdf viewer.
I found
Joe Cheng has given one approach to displaying a pdf by putting it in the www directory (e.g. called output.pdf) and using a call like tags$iframe(src="output.pdf", width="600", height="900"). I have tried this, and it works quite well. It even works within a renderUI call in server.R, where the filename can be changed dynamically.
But... it doesn't have some nice features of using the browser's pdf displayer, e.g. saving to a file.
I tried replacing the tags$iframe with straight HTML, trying to pop up a new window:
but this didn't seem to do anything.
Thanks for any help!