🌐
npm
npmjs.com › package › @react-pdf › renderer
react-pdf/renderer
import React from 'react'; import ReactDOM from 'react-dom'; import { PDFViewer } from '@react-pdf/renderer'; const App = () => ( <PDFViewer> <MyDocument /> </PDFViewer> ); ReactDOM.render(<App />, document.getElementById('root'));
      » npm install @react-pdf/renderer
    
Published   Apr 04, 2026
Version   4.3.3
Author   Diego Muracciole
🌐
React-pdf
react-pdf.org › advanced
React-pdf
If you need to render documents with 30 pages or more in the browser, using react-pdf directly in React can occupy the browser's main thread for a long time. This can lead to unresponsive UI and browsers offering the user to abort the script. To avoid this, you should render large documents inside a web worker. Web workers are executed in separate threads, and therefore do not block the main thread of the browser. This way, the UI can stay responsive while the PDF is being rendered. For an example on how to run react-pdf in a web worker, see this blog post.
🌐
CodeSandbox
codesandbox.io › examples › package › @react-pdf › renderer
react-pdf/renderer examples
react-responsive-navigationA simple React.JS Responsive Navigation with React Router and Styled Components.
🌐
GitHub
github.com › diegomura › react-pdf
GitHub - diegomura/react-pdf: 📄 Create PDF files using React
import React from 'react'; import ReactDOM from 'react-dom'; import { PDFViewer } from '@react-pdf/renderer'; const App = () => ( <PDFViewer> <MyDocument /> </PDFViewer> ); ReactDOM.render(<App />, document.getElementById('root'));
Starred by 16.5K users
Forked by 1.3K users
Languages   TypeScript 84.4% | JavaScript 15.5%
🌐
GitHub
github.com › wojtekmaj › react-pdf
GitHub - wojtekmaj/react-pdf: Display PDFs in your React app as easily as if they were images. · GitHub
Check the sample directory in this repository for a full working example. For more examples and more advanced use cases, check Recipes in React-PDF Wiki. If you want to use annotations (e.g. links) in PDFs rendered by React-PDF, then you would need to include stylesheet necessary for annotations ...
Starred by 11K users
Forked by 999 users
Languages   TypeScript 94.5% | CSS 5.4% | HTML 0.1%
🌐
npm
npmjs.com › package › @react-pdf › render
react-pdf/render
December 29, 2025 - import fs from 'fs'; import render from '@react-pdf/render'; import pdfkit from '@react-pdf/pdfkit'; const PDFDocument = pdfkit.default; const ctx = new PDFDocument({ autoFirstPage: false }); const doc = {}; // See above render.default(ctx, ...
      » npm install @react-pdf/render
    
Published   Dec 29, 2025
Version   4.3.2
Author   Diego Muracciole
🌐
CodeSandbox
codesandbox.io › s › react-pdfrenderer-bzxde
react-pdf/renderer
February 10, 2021 - @react-pdf/renderer using @babel/runtime, @react-pdf/fontkit, @react-pdf/pdfkit, @react-pdf/png-js, @react-pdf/textkit, blob-stream, cross-fetch, emoji-regex, is-url
Published   Feb 10, 2021
🌐
npm
npmjs.com › package › react-pdf
react-pdf - npm
February 25, 2026 - Check the sample directory in this repository for a full working example. For more examples and more advanced use cases, check Recipes in React-PDF Wiki. If you want to use annotations (e.g. links) in PDFs rendered by React-PDF, then you would need to include stylesheet necessary for annotations ...
      » npm install react-pdf
    
Published   Feb 25, 2026
Version   10.4.1
Author   Wojciech Maj
🌐
DEV Community
dev.to › przpiw › react-pdf-rendering-4g7b
React & PDF Rendering - DEV Community
January 12, 2022 - React-pdf package lets us create awesome looking PDFs using React. Its simple to use and the documentation is developer-friendly. We will create a simple application that dynamically updates our PDF-styled template which we render in DOM.
Find elsewhere
🌐
DEV Community
dev.to › jaymeeu › how-to-generate-custom-pdf-using-react-and-react-pdf-6d4
How to Generate Custom PDF, Using React and React-PDF. - DEV Community
February 12, 2024 - Ensure to import BlobProvider from @react-pdf/renderer. Once updated, click the print button and see the invoice preview in a new tab.
🌐
CodeSandbox
codesandbox.io › examples › package › react-pdf
react-pdf examples - CodeSandbox
reactReact example starter project · pdf-viwer · pdf-reader · pdf-view · coolenginner/pdf-edit-react · pdf-sign · react-doc-viewerDocument viewer for react. Renders online/local documents. react-pdf-react-pageflip · react-pdf-sample-forked-displaying-pdf-using-react ·
🌐
Snyk
snyk.io › advisor › @react-pdf/renderer › @react-pdf/renderer code examples
Top 5 @react-pdf/renderer Code Examples | Snyk
import React, { PureComponent } from "react" import PropTypes from "prop-types" import { Page, Document, StyleSheet } from "@react-pdf/renderer" import { Side } from "./components" const styles = StyleSheet.create({ page: { flexDirection: "row", backgroundColor: "#E4E4E4", }, }) export default class Test extends PureComponent { static document = true static propTypes = { a: PropTypes.string.isRequired, b: PropTypes.string.isRequired, } render() { return (
🌐
Nutrient
nutrient.io › blog › sdk › how to build a reactjs pdf viewer with react pdf
How to build a React PDF viewer with react-pdf (2026)
January 28, 2026 - A value of 1 is 100 percent, 1.5 is 150 percent, and so on. The buttons clamp the range between 50 percent and 300 percent. react-pdf exports a Thumbnail component that renders a small preview of a page.
🌐
LogRocket
blog.logrocket.com › home › generating pdfs in react with react-pdf
Generating PDFs in React with react-pdf - LogRocket Blog
January 24, 2025 - Furthermore, in the viewer object, we are using the width and height properties. As a result, this will tell react-pdf that we want the browser’s PDF viewer to take up all of the space on the page · As the name suggests, the PDFViewer component will render a PDF viewer on the browser
🌐
DEV Community
dev.to › kartikbudhraja › generating-dynamic-pdfs-with-react-a-step-by-step-guide-pcm
Generating Dynamic PDFs with React. A Step-by-Step Guide. - DEV Community
September 17, 2023 - React-pdf/Renderer exports a set of React primitives that enable you to render things into your document very easily.
🌐
Apryse
apryse.com › blog › build-custom-react-pdf-viewer-v2
How To Build a Customizable React PDF Viewer?
If you are using React 18 (which is the current default version at the time of writing this article), then it is likely to implement StrictMode which causes the React Components to render twice during development. While that does not occur with production builds, it can be very confusing during development, so you may wish to remove the <React.StrictMode> element from main.jsx. You can now create a reusable PDF Viewer component in your React app. In our example, though, we will keep things simple and just add the code directly to `App.js`.
Published   October 14, 2024
🌐
Nutrient
nutrient.io › blog › sdk › create pdfs with react
How to Create a PDF with React - Nutrient
November 17, 2024 - To render it, you can use the <PDFViewer>(opens in a new tab) React DOM component that ships with react-pdf. It uses an <iframe> to render the document in the browser: ... You can also refer to our Nutrient Web SDK for React example and use ...