🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Easy-PDF is a jQuery based PDF viewer that parses and displays a based64 encoded PDF in a draggable, resizable jQuery UI dialog popup.

PDF jQuery-UI Base64

Documentation

Easy-PDF

Instructions

Requires the following dependencies:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.0.489/pdf.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.0.489/pdf.worker.js"></script>  <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

Then just call:

easyPDF(base64, "Header Title of Dialog");

to get your PDF shown with some simple controls.

Development

Currently in order to get it to look a certain way you'll just have to fiddle with it directly with styling or changing the code itself

Demo

Check it out in action here: https://davealdon.github.io/Easy-PDF/.

Troubleshooting

Make sure your base64 is properly formatted. If you're not sure, you can dump it into Notepad++ and convert it to a file, or download it by putting it in the decode window here: https://www.base64decode.org/ and if it doesn't have any issues then it will show.


You May Also Like