
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@letter-ai/lector
Advanced tools
Simple primitives to compose powerful PDF viewing experiences.
powered by PDF.js
and React
lector
A composable, headless PDF viewer toolkit for React applications, powered by PDF.js
. Build feature-rich PDF viewing experiences with full control over the UI and functionality.
npm install @letter-ai/lector pdfjs-dist
# or with yarn
yarn add @letter-ai/lector pdfjs-dist
# or with pnpm
pnpm add @letter-ai/lector pdfjs-dist
Here's a simple example of how to create a basic PDF viewer:
import { CanvasLayer, Page, Pages, Root, TextLayer } from "@letter-ai/lector";
import "pdfjs-dist/web/pdf_viewer.css";
export default function PDFViewer() {
return (
<Root
source="/sample.pdf"
className="w-full h-[500px] border overflow-hidden rounded-lg"
loader={<div className="p-4">Loading...</div>}
>
<Pages className="p-4">
<Page>
<CanvasLayer />
<TextLayer />
</Page>
</Pages>
</Root>
);
}
We welcome contributions! Key areas we're focusing on:
Special thanks to these open-source projects that provided inspiration:
MIT © Unriddle AI
FAQs
Headless PDF viewer for React
The npm package @letter-ai/lector receives a total of 176 weekly downloads. As such, @letter-ai/lector popularity was classified as not popular.
We found that @letter-ai/lector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.