react-pdf-kit-vite — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited react-pdf-kit-vite (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Use this skill when: the developer asks to add a PDF viewer using @react-pdf-kit/viewer to a Vite-based React project. For Next.js use the framework-specific skills.
Vite handles pdfjs-dist's ESM-only build out of the box, and RPConfig sets up the PDF.js worker automatically. There is no Vite-specific setup: the generic provider chain is all you need.
@react-pdf-kit/viewer. Do NOT install pdfjs-distseparately.** It is an auto-installed peer dependency. You install pdfjs-dist yourself only when overriding its version (see react-pdf-kit-worker-config, which includes the Vite ?url worker recipe).
RPConfig sets up thePDF.js worker for you. Do NOT set GlobalWorkerOptions.workerSrc or pass a workerUrl for the default case.
stylesheet.
RPLayout for everynew integration.
pnpm add @react-pdf-kit/viewer// src/PdfViewer.tsx
import {
RPConfig,
RPProvider,
RPLayout,
RPPages,
} from '@react-pdf-kit/viewer'
export function PdfViewer({ src }: { src: string }) {
return (
<RPConfig>
<RPProvider src={src}>
<RPLayout toolbar>
<RPPages />
</RPLayout>
</RPProvider>
</RPConfig>
)
}// src/App.tsx
import { PdfViewer } from './PdfViewer'
export function App() {
return (
<main style={{ height: '100vh' }}>
<PdfViewer src="/sample.pdf" />
</main>
)
}The viewer adapts to its container, so give the parent a definite height (100vh or fixed), or size it via RPLayout's style prop.
To load a bundled PDF, import it (import pdf from './doc.pdf') and pass it as src; Vite resolves the asset URL.
pnpm install
pnpm build
pnpm devOpen the dev server URL. The first PDF page should render with the default toolbar. Scroll to confirm pages mount as they enter the viewport (virtualization), and select text on a rendered page to confirm the text layer mounted.
react-pdf-kit-setup: generic React fundamentals.react-pdf-kit-worker-config: for overriding the pdfjs-distversion and configuring a custom worker URL (Vite ?url recipe).
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.