UNPKG

pdfviewer

Version:

PDF Viewer using Mozila PDF JS.

31 lines (29 loc) 789 B
<!DOCTYPE html> <html dir="ltr" mozdisallowselectionprint moznomarginboxes> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="google" content="notranslate"> <style> html, body { margin: 0; padding: 0; height: 100%; width: 100%; } #container { height: 100%; width: 100%; } </style> <script src="/dist/index.js"></script> </head> <body> <div id="container"></div> <script> new PdfViewer({pdfUrl: '/examples/sample.pdf', staticHost: '/dist', onerror: function(err) { console.error('PdfViewer', err); }}).embed(document.getElementById('container')) </script> </body> </html>