PDF viewer library with precise text highlighting and smart search.
| Format | URL |
|---|---|
| IIFE (script tag) | pdflight.iife.js |
| ESM (import) | pdflight.js |
<script src="https://pilotso11.github.io/pdflight/pdflight.iife.js"></script>
<script>
const viewer = new pdflight.PdfViewer(document.getElementById('viewer'), {
toolbar: true,
});
viewer.load('document.pdf');
</script>
<script type="module">
import { PdfViewer } from 'https://pilotso11.github.io/pdflight/pdflight.js';
const viewer = new PdfViewer(document.getElementById('viewer'), {
toolbar: true,
});
viewer.load('document.pdf');
</script>
Pin to a specific version to avoid unexpected changes:
https://pilotso11.github.io/pdflight/pdflight-0.1.0.iife.js
https://pilotso11.github.io/pdflight/pdflight-0.1.0.js
See the releases page for all versions.