WorldWideScripts.net Delivering the best Add-Ons in more than 37 languages.

中文(简体), English, हिन्दी/हिंदी, Español/Castellano, العربية, Русский язык, Français, 中文 (台灣), বাংলা, Bahasa Indonesia, اردو, Português, Deutsch, Bahasa Melayu (بهاس ملايو‎), 日本語 (にほんご), فارسی, Italiano, తెలుగు, Türkçe, ગુજરાતી, Język polski/polszczyzna, Tiếng Việt, ಕನ್ನಡ, Українська мова, ไทย
JavaScript / Miscellaneous

jQuery Document Viewer

— Add-On to WorldWideScripts.net

Subscribe to our feed to stay up to date!

New! Follow us as you want it!


jQuery Document Viewer - CodeCanyon Item for Sale

Ads

Ad: Bluehost hosting

Description

Document Viewer is a jQuery plugin that allows you to view several file formats directly in a web page. The file formats that Document Viewer supports are:
  1. PDF Files
  2. Images – png, jpg, jpeg, gif
  3. Audio – mp3, m4a, oga, webma, fla
  4. Video – m4v, ogv, ogg, webmv, flv

Usage

Initialize the plugin
 var documentViewer = $('#document-preview').documentViewer(); 
Load A document
documentViewer.load('http://absolute/url/to/file.pdf');

Load a document without an extension

documentViewer.load('http://absolute/url/to/1', {extension:'pdf'});

Load a document passing all options
documentViewer.load('http://absolute/url/to/file.pdf', { height:600; width:500; extension:'pdf', autoplay:true, autoLoadDependencies:true, debug:false, callback:function(){ alert('document loaded'); }, jPlayer:{ //you can play any jPlayer options here warningAlerts:false } });

Document Viewer uses the following 3rd party 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 text & code documents.
  • This plugin uses pdf.js to render pdfs. Pdf.js is being developed by a very solid team, but it is still in beta, which means that it may not render all PDFs 100% correctly.
  • The plugin works in IE7 & 8 for all types except pdfs.

Need a project management system? Try my new app

Duet Project Management

MediaBox – Audio & Video

advanced-client-portal

Download
Other components in this categoryAll components of this author
CommentsFrequently asked questions and answers

Properties

Created:
4 March 12

Last Update:
20 June 15

High Resolution:
No

Compatible Browsers:
IE9, IE10, IE11, Firefox, Safari, Opera, Chrome

Files Included:
JavaScript JS, HTML, CSS, PHP, SWF/FLV

Software Version:
jQuery

Keywords

eCommerce, eCommerce, All Items, audio, code, document, document viewer, file, file viewer, media, pdf, text, video, viewer