react-pdf

Generate PDFs from JSON specifications using React-based APIs.

Updated Jan 18, 2026
One-click install
npx skills add https://github.com/xztxy/json-render --skill react-pdf-xztxy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-pdf
Source: https://github.com/xztxy/json-render/tree/main/skills/react-pdf
Command: npx skills add https://github.com/xztxy/json-render --skill react-pdf-xztxy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate PDFs from JSON specifications in React-based applications, enabling consistent, component-driven document creation without manual styling.

Core Features & Use Cases

  • Generate PDFs from structured JSON specs using a React-friendly API.
  • Support rendering to buffers, streams, or files for server and client contexts.
  • Integrate with existing catalogs to produce consistent documents (invoices, reports, labels).

Quick Start

Pass a JSON spec to the renderToBuffer API to generate a PDF, then stream or save the output.

Frequently Asked Questions about react-pdf

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

FAQPage Schema
How do I generate PDFs from JSON specs in React applications?

To generate PDFs from JSON specs in React, use @json-render/react-pdf APIs like renderToBuffer, renderToStream, or renderToFile. Pass structured JSON specifications to these functions to produce consistent, component-driven documents without manual styling.

Can I render PDFs on the server side using React APIs?

Yes, you can render PDFs on the server side using React APIs by leveraging renderToStream or renderToFile. The implementation supports server-safe imports and streaming contexts, allowing buffer generation for invoices and reports across server and client environments.

What is JSON-based PDF rendering and when should I use it?

JSON-based PDF rendering is the process of converting structured JSON specifications into formatted PDF documents using React components. Use it for generating invoices, reports, labels, and forms to ensure consistent document creation without manual styling.

Does this PDF generation approach support streaming output?

Yes, this PDF generation approach supports streaming output through the renderToStream API. It also supports rendering to buffers via renderToBuffer and saving to files via renderToFile, providing flexible output methods for different application contexts.

What is the best way to create invoices and reports in React without manual styling?

The best way to create invoices and reports in React without manual styling is using @json-render/react-pdf to generate PDFs from JSON specifications. This component-driven approach integrates with existing catalogs to produce consistent documents automatically.

Why does PDF rendering from JSON specs need server-safe imports?

PDF rendering from JSON specs needs server-safe imports to ensure compatibility across both client-side and server-side contexts. This allows the same JSON specification to generate PDFs via renderToBuffer or renderToStream regardless of the execution environment.