Skip to content
/ webpack-react-pdf Public template

Configure webpack to generate PDFs in the Browser with @react-pdf/renderer

Notifications You must be signed in to change notification settings

tobua/webpack-react-pdf

Repository files navigation

webpack-react-pdf

webpack-react-pdf

webpack setup using @react-pdf/renderer (^3.0.0) to generate and display PDF documents in the browser.

  • Images
  • Fonts
  • Async Loaded Fonts
  • Table
  • Download Link
  • Chart

Check out the Demo

Includes an example of how Charts rendered with React (recharts) can be "screenshotted" and inserted into the PDF as images.

Installation & Usage

After cloning this repository run the following commands

npm install
npm start

Polyfills

Since PDF rendering usually happens on the server side with node. The following node built in dependencies have to be polyfilled.

Browser Support

Tested with recent versions of Chrome, Safari, Firefox and their mobile counterparts.

About

Configure webpack to generate PDFs in the Browser with @react-pdf/renderer

Resources

Stars

Watchers

Forks