webodf / ViewerJS

ViewerJS: Document Reader in JavaScript
http://viewerjs.org
1.94k stars 421 forks source link

Local html5 whitout any webserver #189

Open radoiflorin opened 8 years ago

radoiflorin commented 8 years ago

Hello,

I wanna make a site in html5 to show some pdf files and some videos.....i wanna put the html5 to a cd and run it from any device....i try to use your tool, i try it on an online website and it~s work, but when i try to use on my desktop doesnt work. Html folder is located in D:\desktop\Proiecte\ebook The ViewerJS folder is in the root D:\desktop\Proiecte\ebook\ViewerJS The pdf files are locate in D:\desktop\Proiecte\ebook\media\pdf\1.1.1.pdf In my html file code is: `

` Can u help me, please?! What i am doing wrong! Many Thanks!
chrilith commented 8 years ago

Hi,

Most common problem is the security settings of the web browser which, by default, doesn't allow file access from "file" url scheme. It is not a problem related to ViewerJS.

2 solutions:

Chris

angerangel commented 7 years ago

Hi, I have the same problem. Please may you add the GET scheme? Like ViewerJS/index.html?file=/path/to/file?

At the present if I use the URL: /home/max/ViewerJS/ I don't get the viewer, but only the list of files of ViewerJS folder.

If I use the URL: /home/max/ViewerJS/index.html I get the viewer, but I don't load any document

If I use the URL: /home/max/ViewerJS/#../test.pdf I get the list of files of ViewerJS

If I use the URL /home/max/ViewerJS/#../home/max/test.pdf I get nothing.