An open API service indexing awesome lists of open source software.

https://github.com/tobua/rspack-react-pdf

rspack setup to generate PDFs in the Browser with @react-pdf/renderer
https://github.com/tobua/rspack-react-pdf

Last synced: 3 months ago
JSON representation

rspack setup to generate PDFs in the Browser with @react-pdf/renderer

Awesome Lists containing this project

README

          

# rspack-react-pdf

rspack-react-pdf

`rspack` setup using [`@react-pdf/renderer`](https://react-pdf.org) (`^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](https://rspack-react-pdf.vercel.app 'PDF Generation in Browser Demo')

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

> [!NOTE]
> This setup still uses the Rspack CLI. Rspack recently released a wrapper called [Rsbuild](https://rsbuild.dev) which might be easier to use.

## Installation & Usage

After cloning this repository run the following commands

```sh
npm install
npm start
```

## Browser Support

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