DOCUMENTS / Trail of Bits
React-PDF
Generates PDF documents with @react-pdf/renderer in TypeScript and JSX — flexbox layout, inline SVG, registered local fonts, Knuth-Plass typesetting — with a when-not-to-use map and crash-avoidance rules for fonts and async rendering.
“Generates PDF documents using the React-PDF library (@react-pdf/renderer) with TypeScript and JSX. Use when creating PDFs, generating reports, invoices, forms, resumes, or any document that needs flexbox layout, SVG graphics, custom fonts, or professional typesetting.”
01 / THE REASONING
Why this made the selection.
- States when NOT to use it — reading PDFs, filling forms, HTML conversion — routing each to pdfplumber, pypdf/pdftk or WeasyPrint instead of stretching one tool across every PDF task.
- The three critical requirements (fonts must be local files, async rendering wrapped in an IIFE, hyphenation callback for custom fonts) are each a real crash the library’s docs bury, stated as hard rules.
- Bundles a ~65-entry Google Fonts reference with direct TrueType URLs and a full component/CSS-property reference, so font registration stops being the bottleneck it usually is.
02 / THE REVIEW RECORD
What we actually inspected.
Source review has boundaries.
A clear record is more useful than a “safe” badge.
Material inspected
- plugins/react-pdf/skills/react-pdf/SKILL.md
- references/components.md
- references/google-fonts.txt
- assets/example-template.tsx listing
- plugins/react-pdf/LICENSE
- plugins/react-pdf/README.md
Our findings
- The references exist as claimed: components.md is a prop-by-prop API reference and google-fonts.txt is a tab-separated font/variant/URL table.
- The preview workflow prefers pdftoppm (poppler) with PyMuPDF as fallback, which avoids a hard Python dependency for the common case.
- The plugin carries its own MIT LICENSE file inside the trailofbits/skills-curated repository, which describes itself as community skills curated and distributed by Trail of Bits.
Not established by this review
- No PDF was generated; the example template and rendering commands were read, not run.
- The ~65 font URLs were spot-checked for format only, not downloaded.
The review applies to the material and revision named here. A newer upstream release can change its behavior.
03 / PUT IT TO WORK
Add a skill to your workflow.
DOCUMENTED COMMAND
npx skills add trailofbits/skills-curated/plugins/react-pdf/skills/react-pdf --skill react-pdf Run in your terminal to choose your AI tools, project or global scope, and installation method. This short command follows the current upstream version; the review covers the revision shown above.
Optional: install the reviewed revision
Keeps the original source and installer version where recorded, while leaving your AI tools and installation scope for you to choose.
npx skills add https://github.com/trailofbits/skills-curated/tree/6d05be4889017b06fb15069f371afd220daffb62/plugins/react-pdf/skills/react-pdf --skill react-pdf - Install the complete skill directory including references and the example template; the SKILL.md assumes they are present.
- Install react and @react-pdf/renderer in the target project, plus tsx to run TSX scripts directly.
Before you start
- Node.js 18+ and npm
- An agent that supports the Agent Skills format
- A document to generate; local font files for anything beyond the built-ins
04 / FOLLOW THE EVIDENCE
The source trail.
Our notes are separate from the original resource.
Check upstream before adopting a new version.
https://github.com/trailofbits/skills-curated/blob/6d05be4889017b06fb15069f371afd220daffb62/plugins/react-pdf/skills/react-pdf/SKILL.md
Supports: summary, upstreamDescription, whySelected, bestFor, limitations, review, access
https://github.com/trailofbits/skills-curated/blob/6d05be4889017b06fb15069f371afd220daffb62/plugins/react-pdf/skills/react-pdf/references/components.md
Supports: review, whySelected
https://github.com/trailofbits/skills-curated/blob/6d05be4889017b06fb15069f371afd220daffb62/plugins/react-pdf/skills/react-pdf/references/google-fonts.txt
Supports: review, whySelected
- Plugin license (MIT) ↗Checked
https://github.com/trailofbits/skills-curated/blob/6d05be4889017b06fb15069f371afd220daffb62/plugins/react-pdf/LICENSE
Supports: license
https://github.com/trailofbits/skills-curated/blob/6d05be4889017b06fb15069f371afd220daffb62/plugins/react-pdf/README.md
Supports: install, compatibility
https://github.com/vercel-labs/skills/blob/7407f3893ad4dceab546ac002c3ef806e4000c73/README.md
Supports: install