# diegomura/react-pdf

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/diegomura-react-pdf).**

16,403 stars · 1,304 forks · TypeScript · mit

## Links

- GitHub: https://github.com/diegomura/react-pdf
- Homepage: https://react-pdf.org
- awesome-repositories: https://awesome-repositories.com/repository/diegomura-react-pdf.md

## Topics

`flexbox` `pdf` `react` `renderer`

## Description

This library provides a rendering engine that translates declarative component trees into PDF files. It enables the construction of complex document structures using a component-based architecture, allowing developers to define layout, styling, and content programmatically. The system operates across both browser and server-side environments, offering a unified interface for generating structured documents.

The project distinguishes itself through a sophisticated layout and rendering pipeline that handles the complexities of document creation. It utilizes a flexbox-based engine for element positioning and performs font-metric-based typesetting to ensure precise text rendering. To maintain responsiveness during the generation of large or complex files, the library offloads heavy layout calculations and document processing to background worker threads.

The capability surface includes comprehensive tools for visual and structural design, such as vector graphics rendering, custom typography integration, and automated pagination that manages content overflow across pages. It supports dynamic report automation and interactive features, including the embedding of fillable form fields and hyperlinks. Developers can also utilize built-in debugging overlays to inspect layout boundaries and margins during the design process.

## Tags

### Content Management & Publishing

- [PDF Generation Libraries](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/pdf-generation-libraries.md) — Creates PDF documents using declarative component structures and style objects within a component-based architecture.
- [Documentation Generators](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-architecture-modeling/documentation-tooling/generation-publishing/documentation-generators.md) — Constructs professional PDF documents using a declarative component-based architecture. ([source](https://cdn.jsdelivr.net/gh/diegomura/react-pdf@master/README.md))
- [Component-Based Renderers](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/document-processing-conversion/document-processing/rendering-visualization/pdf-rendering-engines/component-based-renderers.md) — Translates component trees into PDF files with support for custom fonts, vector graphics, and interactive forms.
- [Cross-Platform Generators](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/pdf-generation-libraries/cross-platform-generators.md) — Generates and previews PDF files in both browser and server-side environments using a unified component API.
- [Document Layout Engines](https://awesome-repositories.com/f/content-management-publishing/static-site-document-generators/document-layout-engines.md) — Arranges visual components using nested containers, text blocks, and free-form drawing surfaces for complex document designs. ([source](https://react-pdf.org/components))
- [Document Exporting](https://awesome-repositories.com/f/content-management-publishing/content-formats-exporting/export-formats/pdf-exports/document-exporting.md) — Saves rendered document structures directly to the local file system for automated report generation. ([source](https://cdn.jsdelivr.net/gh/diegomura/react-pdf@master/README.md))
- [Programmatic Generation APIs](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-architecture-modeling/documentation-tooling/generation-publishing/documentation-generators/programmatic-generation-apis.md) — Provides granular control over the rendering lifecycle and document state through component-based logic. ([source](https://react-pdf.org/hooks))

### User Interface & Experience

- [Declarative Layout Systems](https://awesome-repositories.com/f/user-interface-experience/layout-utilities/declarative-layouts/declarative-layout-systems.md) — Defines complex document structures and pagination logic using nested containers and responsive style properties.
- [Declarative Component Architectures](https://awesome-repositories.com/f/user-interface-experience/declarative-component-architectures.md) — Constructs document layouts using a hierarchical, component-based architecture that maps directly to final document structures.
- [Fillable Form Fields](https://awesome-repositories.com/f/user-interface-experience/form-field-extensions/fillable-form-fields.md) — Embeds fillable form fields like text inputs and checkboxes directly into generated PDF documents. ([source](https://react-pdf.org/form))
- [Declarative Style Objects](https://awesome-repositories.com/f/user-interface-experience/styling-theming-systems/content-styling/component-styling-tools/component-styling/declarative-style-objects.md) — Defines visual properties using a centralized object-based system that maps styles to components for consistent document layout. ([source](https://react-pdf.org/styling))
- [Interactive PDF Form Fields](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/interactive-pdf-form-fields.md) — Embeds fillable fields and input elements into documents to enable user data entry.
- [Custom Font Registrars](https://awesome-repositories.com/f/user-interface-experience/styling-theming-systems/typography-and-iconography/typography/font-libraries/custom-font-registrars.md) — Loads external font files and maps them to specific styles and weights for precise text rendering. ([source](https://react-pdf.org/fonts))
- [Typography Customization](https://awesome-repositories.com/f/user-interface-experience/typography-customization.md) — Registers and applies external font files to ensure consistent text rendering across document layouts.
- [Document Previewers](https://awesome-repositories.com/f/user-interface-experience/document-previewers.md) — Displays generated document content directly within a web browser interface using an embedded viewer. ([source](https://cdn.jsdelivr.net/gh/diegomura/react-pdf@master/README.md))
- [Typesetting Engines](https://awesome-repositories.com/f/user-interface-experience/layout-density-utilities/resolution-independent-engines/coordinate-grids/glyph-alignment-metrics/typesetting-engines.md) — Calculates line breaks and text wrapping by measuring glyph dimensions against font metrics for precise typography.
- [Document Media Queries](https://awesome-repositories.com/f/user-interface-experience/styling-theming-systems/content-styling/css-utility-libraries/css-utilities/conditional-style-queries/document-media-queries.md) — Enables conditional styling based on page dimensions or orientation to ensure content adapts to different document contexts. ([source](https://react-pdf.org/styling))
- [Document Preview and Export Utilities](https://awesome-repositories.com/f/user-interface-experience/document-previewers/document-preview-and-export-utilities.md) — Renders documents within iframes, triggers browser downloads, and exposes raw data blobs for programmatic handling. ([source](https://react-pdf.org/components))
- [Dynamic Component Rendering](https://awesome-repositories.com/f/user-interface-experience/dynamic-component-rendering.md) — Generates text content dynamically by passing functions to components at runtime. ([source](https://react-pdf.org/advanced))
- [Element Groupings](https://awesome-repositories.com/f/user-interface-experience/element-groupings.md) — Organizes multiple graphical elements into containers to apply shared styles and transformations. ([source](https://react-pdf.org/svg))
- [Flexbox Layout Engines](https://awesome-repositories.com/f/user-interface-experience/flexbox-layout-engines.md) — Uses a cross-platform flexbox engine to calculate element positioning and dimensions for document flow.
- [Automated Hyphenation Engines](https://awesome-repositories.com/f/user-interface-experience/styling-theming-systems/typography-and-iconography/text-styling-utilities/automated-hyphenation-engines.md) — Breaks words across lines using automated algorithms to improve visual consistency and legibility. ([source](https://react-pdf.org/advanced))
- [Hyphenation Logic](https://awesome-repositories.com/f/user-interface-experience/typography-customization/hyphenation-logic.md) — Defines custom logic for breaking words across lines to control text flow and layout precision. ([source](https://react-pdf.org/fonts))

### Education & Learning Resources

- [Data-Driven Report Engines](https://awesome-repositories.com/f/education-learning-resources/academic-research-syntheses/automated-report-generators/data-driven-report-engines.md) — Generates complex, data-driven documents on the fly by rendering dynamic content.

### Software Engineering & Architecture

- [Background Rendering Workers](https://awesome-repositories.com/f/software-engineering-architecture/background-processing/background-rendering-workers.md) — Processes complex documents in background threads to keep the main interface responsive during generation. ([source](https://react-pdf.org/advanced))
- [UI Thread Responsiveness](https://awesome-repositories.com/f/software-engineering-architecture/performance-reliability/performance-optimization/frontend-rendering-loading/ui-thread-responsiveness.md) — Offloads heavy layout and document processing to background threads to maintain main thread responsiveness.

### Data & Databases

- [Pagination](https://awesome-repositories.com/f/data-databases/pagination.md) — Automatically splits content across multiple pages when elements exceed available space. ([source](https://react-pdf.org/advanced))
- [Document Pagination Engines](https://awesome-repositories.com/f/data-databases/pagination/document-pagination-engines.md) — Automatically monitors content overflow to split documents across pages based on defined constraints.

### Graphics & Multimedia

- [Vector Graphics Renderers](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/vector-rendering-pipelines/vector-graphics-renderers.md) — Draws scalable vector shapes, paths, and text within documents using a coordinate system. ([source](https://react-pdf.org/svg))
- [Media and Hyperlink Embedders](https://awesome-repositories.com/f/graphics-multimedia/graphics-and-media/media-and-hyperlink-embedders.md) — Integrates images from local or remote sources and adds interactive hyperlinks into the document flow. ([source](https://react-pdf.org/components))
- [Vector Styling Properties](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/vector-rendering-pipelines/vector-graphics-renderers/vector-styling-properties.md) — Configures the appearance of vector elements using style objects to maintain consistent visual design. ([source](https://react-pdf.org/svg))
- [PDF Rendering Primitives](https://awesome-repositories.com/f/graphics-multimedia/visualization-mapping/visualization-frameworks/low-level-rendering-engines/pdf-rendering-primitives.md) — Translates high-level component properties into low-level vector drawing and text placement instructions.

### Development Tools & Productivity

- [Text Flow Constraints](https://awesome-repositories.com/f/development-tools-productivity/developer-utilities-libraries/programming-logic-libraries/programming-utilities/control-flow-libraries/text-flow-constraints.md) — Prevents orphans and widows by specifying minimum line counts and sibling proximity constraints to maintain professional document layout. ([source](https://react-pdf.org/advanced))
- [Document Structure Models](https://awesome-repositories.com/f/development-tools-productivity/documentation-generators/document-structure-models.md) — Organizes content into a root document container that holds individual pages and defines overall layout. ([source](https://react-pdf.org/components))

### Scientific & Mathematical Computing

- [Mathematical Vector Renderers](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/mathematical-typesetting-engines/typesetting-engines/mathematical-rendering-configurations/mathematical-vector-renderers.md) — Converts mathematical notation into embedded vector graphics to include complex formulas directly within documents. ([source](https://react-pdf.org/advanced))

### System Administration & Monitoring

- [Layout Inspection Overlays](https://awesome-repositories.com/f/system-administration-monitoring/diagnostic-tools/visual-debugging-overlays/layout-inspection-overlays.md) — Visualizes element boundaries, padding, and margins by enabling a built-in overlay to inspect component positioning. ([source](https://react-pdf.org/advanced))
