Chisle
코딩 에이전트 플러그인, 20개 실시간 작업에서 기본 모델 52% 활용, 간결한 페르소나와 출력 압축 제공
@missing-elements/pdfjs-viewer는 PDF.js 기본 뷰어를 기반으로 한 자체 호스팅 PDF 뷰어 웹 컴포넌트 문서입니다
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.
개발 도구JavaScript · FluentGitHub @missing-elements온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
A standalone, isolated, self-hostable, plug-in custom element for viewing PDF files, based on the PDF.js viewer
README 전체를 불러오는 중입니다.
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.