react-pdf-gen
v1.3.1
Published
A library for generating PDFs with specific layouts using React and @react-pdf/renderer
Maintainers
Readme
react-pdf-gen
A library for generating PDFs with specific layouts using React and @react-pdf/renderer.
Installation
npm install react-pdf-genUsage
This library provides a hook called usePdf to generate and manage PDFs. Below is an example of how to use it.
Methods
save(exportData: ExportData, fileName: string): Generates a PDF and saves it with the specified file nameopenInNewTab(exportData: ExportData)`: Generates a PDF and opens it in a new browser tabprint(exportData: ExportData): Generates a PDF and opens it in a new browser tab, then triggers the print dialog.
