usatenko / jquery-pdfdoc

jQuery PDF Document Viewer Plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using jQuery-PDFDOC

NOTE: The plugin is in VERY early development and so does not have very many features!

Current features:

  • View PDFs in the browser without extra software. PDFs are rendered in JavaScript!
  • Skip to any page immediately, or by next/prev.
  • Zoom in/out
  • Download the source PDF directly!
  • Loading status progress indicator!

The latest version is 0.7

Requirements

Installation

  • Drop the pdf.js file from the PDF.js project zip file you downloaded into your project’s js directory.
  • Drop the jquery.min.js file from jQuery zip file into your project’s js directory.
  • Unzip the contents of jquery-pdfdoc-0.5.zip into the same directory.

Example

This is just a simple example on how to get up and running and display your first PDF document.


<html>
<head>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/pdf.js"></script>
    <script type="text/javascript" src="js/jquery-pdfdoc.js"></script>

    <link href="js/jquery-pdfdoc.css" rel="stylesheet" type="text/css" />
</head>
<body>

    <div style="width: 800px; height: 600px;">

        <div id="mypdfdoc"></div>

    </div>

    <script>
        $(document).ready(function(){

            $('#mypdfdoc').PDFDoc( { source : 'get.php?file=mongodb.pdf' } );

        });
    </script>

</body>
</html>

If any of that is unclear, please feel free to ask a question in the forums or contact me at jazz@funkynerd.com.

About

jQuery PDF Document Viewer Plugin


Languages

Language:CSS 100.0%