
Description
Document Viewer is a jQuery plugin that permits you to look at several file formats specifically in a world wide web webpage. The file formats that Document Viewer supports are:
- PDF Information
- Pictures – png, jpg, jpeg, gif
- Audio – mp3, m4a, oga, webma, fla
- Video – m4v, ogv, ogg, webmv, flv
Use
Initialize the plugin
var documentViewer = $('#document-preview').documentViewer()
Load A document
documentViewer.load('http://complete/url/to/file.pdf')
Load a doc without the need of an extension
documentViewer.load('http://absolute/url/to/1', extension:'pdf')
Load a doc passing all selections
documentViewer.load('http://absolute/url/to/file.pdf', height:600 width:500 extension:'pdf', autoplay:legitimate, autoLoadDependencies:real, debug:false, callback:functionality() notify('document loaded') , jPlayer: //you can enjoy any jPlayer solutions in this article warningAlerts:false )
Document Viewer employs the following 3rd celebration utilities:
- pdf.js
- jPlayer
- Flowplayer
- Google Code Prettify
Important Notes & Quirks
- This is a jQuery plugin with an optional PHP dependency if you want to use textual content & code documents.
- This plugin employs pdf.js to render pdfs. Pdf.js is remaining produced by a extremely sound staff, but it is continue to in beta, which usually means that it may well not render all PDFs 100% correctly.
- The plugin will work in IE7 & 8 for all varieties apart from pdfs.