How To Show Pdf Files To User's Browser,in The Case Of No Plugin Is Installed
Solution 1:
Google provides a tool to do this:
Solution 2:
There's a variety of (horribly ugly) ways you could go about that. You could convert the PDFs (either on the fly, or before and store them) to a format that's usable (plaintext) which is then sent to the browser (either as plain text, or marked up a touch).
There's a variety of command line tools to do the conversion, such as pdftotext
, along with some libraries. It's possible there's even PHP libraries with such functionality.
Though, you would need to use JavaScript on the client to detect the presence (well, lack there of!) of a PDF plugin, and then to load your converted document instead of a .pdf.
Solution 3:
There is a good start of viewing PDF using HTML5. They try to render PDF using native HTML5 element, so no plugin required. But sure it requires modern browsers.
I haven't tried it yet, but maybe you can take a look to pdf.js. This is the working demo.
Post a Comment for "How To Show Pdf Files To User's Browser,in The Case Of No Plugin Is Installed"