open pdf via pdf.js

1.2k views Asked by At

http://mozilla.github.io/pdf.js/examples/learning/helloworld.html here is a guide how to open pdf files in related folder. I want to open file from absolute path. like

var src = "C:\path\path\file.pdf";

how can I do it? I already try with absolute path but there was an error while downloading file via ajax request

2

There are 2 answers

0
Alexey Rytikov On

You can download pdf via AJAX on server and after that open it from the server.

0
alQemist On

Actually you can load local pdf and view it in the browser without uploading. I did not believe it was possible due to browser security but in fact it does work....

http://www.pdfcharts.com/lab/analyze.html