0

I want to open my pdf file. I am using iframe:

var url = 'C:\Users\Desktop\NewFile\example.pdf';

iframe.attr('src', url);

the problem is here when I use my local path iframe is not working but when I use link it is working.

Cœur
  • 37,241
  • 25
  • 195
  • 267
İbo
  • 13
  • 5
  • You must understand that a web project has strong restrictions when accessing local files, and this is a good thing, it's about security and privacy. How is this meant to work in a Web context? is this meant to be stored on the server or client? if you want to display the client's local file, it's not going to work this way, client would need to upload the file. – thmshd Jul 06 '18 at 09:32
  • I understand. ;if i give an link it is working just id doesnt work if i give my local path. I have a pdf and when people enter my account for example about page , I want people to see my pdf document.I am looking for asp.net mvc pdf viewer I cant find good and free example. İf you have any suggestion to me i really want to try it. – İbo Jul 06 '18 at 09:41

0 Answers0