Skip to content

1.1.1

Compare
Choose a tag to compare
@dealfonso dealfonso released this 27 Mar 23:18
· 5 commits to main since this release

PDFjs-viewer is an embeddable and easily customizable PDF viewer that is implemented using the PDF.js library.

So, if you have a div in your web application, you can convert it in a PDF viewer as in the next example:

<div class="pdfjs-viewer">
</div> 
<script>
let pdfViewer = new PDFjsViewer($('.pdfjs-viewer'));
pdfViewer.loadDocument("https://github.com/dealfonso/pdfjs-viewer/raw/main/examples/test.pdf");
</script>

or even simpler

<div class="pdfjs-viewer" pdf-document="https://github.com/dealfonso/pdfjs-viewer/raw/main/examples/test.pdf" initial-zoom="fit">