1

I want to open a pdf file which is stored in my computer (D Drive) only. I have tried various links like https://gist.github.com/aagarw30/d5aa49864674aaf74951 &

displaying a pdf from a local drive in shiny

I can display a pdf file if it is on the web but can't do it if it is on my local drive.

Can anyone please provide with a sample answer

Community
  • 1
  • 1
Rahul Agarwal
  • 4,034
  • 7
  • 27
  • 51

1 Answers1

0

If you can put the pdf file under the www subfolder of your project, then you can just use the following code

  tags$iframe(style="height:400px; width:100%; scrolling:yes", src="test.pdf")

Having web browser opening local files is a security risk, and most modern browsers do not allows this. See http://kb.mozillazine.org/Links_to_local_pages_don't_work

Xiongbing Jin
  • 11,779
  • 3
  • 47
  • 41