Is there any open source Javascript based PDF Viewer available? Any guide to developing this kind of script that renders PDF docs would be helpful.
- 
                    I don't want to use the word "impossible", but suffice it to say that what you're looking for is impractical. – casablanca Aug 22 '10 at 02:44
- 
                    It is possible! 1. use javascript to display a popup telling them to download a reader 2. then use javascript to open the reader download page in a new window? – jqa Aug 22 '10 at 03:01
- 
                    Google Docs does this as it is. And you can embed them in web pages. I personally want to integrate this as a feature in my own sites as I've had problems creep in with Embedded Google Docs (mostly user error introduced by people maintaining sites I create). – James T Snell Oct 04 '11 at 22:05
- 
                    1You can try this http://bloggerplugnplay.blogspot.in/2013/02/javascript-pdf-readerviewer-to-embed-in.html – Code Spy Feb 08 '13 at 06:06
5 Answers
There are some guys at Mozilla working on implementing a PDF reader using HTML5 and JavaScript. It is called pdf.js and one of the developers just made an interesting blog post about the project.
 
    
    - 1,091
- 10
- 9
- 
                    1Github: https://github.com/mozilla/pdf.js, Demo: http://mozilla.github.io/pdf.js/web/viewer.html – mpen May 01 '13 at 15:41
- 
                    3Does anyone know how to actually implement this? I'm finding it really hard to work out?? Are there any step by step guides out there? – Osu Oct 07 '13 at 17:58
- 
                    `PDF.js v1.0.58 (build: ee545dd) Message: Unexpected server response (204) while retrieving PDF "http://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf".` – Ravi Apr 20 '14 at 06:02
- 
                    @Osu In case you or anyone else still needs this: http://mozilla.github.io/pdf.js/examples/ this has some useful docs in it, as does their examples stored on the github: https://github.com/mozilla/pdf.js/tree/master/examples/helloworld (see parent directory to helloworld as well for even more examples) – Thomas F. May 27 '15 at 18:42
There is an open source HTML5/javascript reader available called Trapeze though its still in its early stages.
Demo site: https://brendandahl.github.io/trapeze-reader/demos/
Github page: https://github.com/brendandahl/trapeze-reader
Disclaimer: I'm the author.
 
    
    - 175
- 1
- 5
You can use the Google Docs PDF-viewing widget, if you don't mind having them host the "application" itself.
I had more suggestions, but stack overflow only lets me post one hyperlink as a new user, sorry.
 
    
    - 320
- 3
- 6
Well it's not even close to the full spec, but there is a JavaScript and Canvas based PDF viewer out there.
 
    
    - 8,795
- 3
- 31
- 45
Check out the HTML5 PDF viewer:
 
    
    - 118,978
- 58
- 307
- 400
- 
                    1The GPL version only displays PDFs with a Flash viewer, and it is needed that the PDFs are compressed. For on the fly compression it is needed to install SWFTools on the server. – stackex Jun 11 '13 at 14:40
