react-pdf (diegomura/react-pdf)
Searching Database…
What is this?
react-pdf lets you create PDF files using React components, rendering them either in the browser or on the server with Node.
Is this a renderer or a PDF viewer?
It is a React renderer that generates PDFs from your components; it is not meant for displaying existing PDFs. For viewing PDFs there's a separate, similarly named package.
How do I add it to a project?
Install the package and build your document using the provided React components, then render it either to the DOM in the browser or save it to a file in Node.
Do I need to know JSX and flexbox layout to use it?
Yes — documents are built with React/JSX components, and layout is handled with flexbox, which is one of the project's topics.
Does it work the same on the web and on the server?
Yes, the same React components can be rendered to the DOM in the browser or saved to a file in a Node.js server environment.
Is this project actively maintained?
It has release and CI workflows (main.yml, release.yml, site.yml) and uses a monorepo managed with lerna, suggesting active ongoing development and releases.
How is the codebase organized?
It's a monorepo built with lerna/yarn workspaces, with packages for the core renderer and a separate examples workspace used for local development.
What does the license cost me?
It's released under the MIT license, so it's free to use, modify, and distribute, including in commercial projects.
Does it support a dev/live-preview mode?
The repo includes a dev script that runs an examples workspace, suggesting a live preview setup for building and testing PDF layouts during development.