Chisle
The coding-agent plugin that bills 52% of a bare model across 20 live tasks. Terse persona + tool-output compressor + context diet.
Docs for @missing-elements/pdfjs-viewer, a self-hostable PDF viewer web component based on the PDF.js default viewer. Install, attributes, API, theming, hosting and framework guides.
Developer toolsJavaScript · FluentGitHub @missing-elementsOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
A standalone, isolated, self-hostable, plug-in custom element for viewing PDF files, based on the PDF.js viewer
Loading the full README.
Read the full README ↗View and edit PDF files using restyled Firefox's built-in viewer. It runs in an isolated iframe and has no runtime dependencies, works everywhere.
Documentation and live playground
pdfjs-dist yourself: PDF.js, its viewer interface, its worker and the data some PDFs need (CMaps, fonts, image decoders, the scripting sandbox) ship in the package, and nothing loads from a CDN by default.pdfjs-dist directly.npm install @missing-elements/pdfjs-viewer
import '@missing-elements/pdfjs-viewer'
Vite, webpack 5 and Next.js bundle the viewer with no configuration. They don't copy the PDF.js data folders, though, because PDF.js loads those files by name. Without them, scanned pages compressed with JBIG2, CCITT or JPEG 2000 render blank or black, CJK text in fonts the PDF doesn't embed goes missing, and JavaScript in PDFs doesn't run. To support every PDF, copy the package's dist folder into your public files, for example in a postinstall script, and point assets-base at it:
<pdfjs-viewer-element src="/file.pdf" assets-base="/pdfjs-viewer/"></pdfjs-viewer-element>
Or load it from a CDN without a build step:
<script type="module" src="https://cdn.jsdelivr.net/npm/@missing-elements/pdfjs-viewer@4/dist/pdfjs-viewer-element.js"></script>
<pdfjs-viewer-element
src="/file.pdf"
page="2"
zoom="page-width"
style="height: 100dvh">
</pdfjs-viewer-element>
The element needs an explicit height. Most attributes apply as soon as they change.
initPromise, setViewerOptions, injectViewerStyles, iframeassets-base, CDN, worker, CSPpdfjs-viewer-element, the deprecated former package nameActively maintained. The package bundles PDF.js 6.5.438 and follows PDF.js releases.
See CONTRIBUTING.md. Report security issues as described in SECURITY.md.