react-pdf-v4

Generate and render PDF documents from React components using @react-pdf/renderer.

Updated Nov 11, 2025
One-click install
npx skills add https://github.com/codexyzdev/codexyz --skill react-pdf-v4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-pdf-v4
Source: https://github.com/codexyzdev/codexyz/tree/main/.trae/skills/react-pdf-v4
Command: npx skills add https://github.com/codexyzdev/codexyz --skill react-pdf-v4

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill makes it easy to generate and render PDF documents directly from React components, enabling in-app document creation without leaving the React ecosystem.

Core Features & Use Cases

  • Document-centric APIs: Document, Page, View, Text, Image, Link, and StyleSheet for building PDFs.
  • Client-side and server-side rendering: Generate PDFs in the browser or on the server.
  • Common use cases: invoices, reports, receipts, manuals, and shareable documents within React apps.

Quick Start

Install the renderer and start building a simple PDF with a Document and a Page. Example: install with npm i @react-pdf/renderer and create a document using Document, Page, and Text components.

Frequently Asked Questions about react-pdf-v4

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a PDF document from React components?

You can generate a PDF document from React components by using the @react-pdf/renderer library, which provides Document, Page, View, Text, and Image APIs to build and render PDFs directly within your app.

Can I render PDFs on the server side using React?

Yes, you can render PDFs on the server side using React. This skill supports both client-side and server-side rendering, allowing you to generate invoices, reports, and documentation outside the browser environment.

What's the best way to create invoices and reports in a React app?

The best way to create invoices and reports in a React app is using the Document and Page APIs from @react-pdf/renderer to structure content, apply StyleSheet styling, and render shareable documents without leaving the React ecosystem.

Do I need any external dependencies to build PDFs with React?

You need to install the @react-pdf/renderer package to build PDFs with React. This library supplies the core Document, Page, View, Text, Image, and StyleSheet components required to construct and style your PDF documents.

Does this React PDF renderer support custom styling and images?

Yes, this React PDF renderer supports custom styling and images. You can use the StyleSheet API to style your documents and the Image component to embed graphics alongside Text and View elements within your Pages.

What are the limitations of generating PDFs directly from React components?

Generating PDFs directly from React components relies on the @react-pdf/renderer API set, meaning you must use its specific Document, Page, View, and Text elements instead of standard HTML tags for rendering your PDF content.