1.1.1
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">