ReportCraft is a project for generating dynamic PDFs using React, TypeScript, and the @react-pdf/renderer
library. It is designed to streamline the creation of professional and customizable reports.
- React: A JavaScript library for building user interfaces.
- TypeScript: Strongly typed superset of JavaScript for safer code.
- Vite: Modern and fast build tool.
- @react-pdf/renderer: Powerful PDF generation for React applications.
- BlobProvider Integration: Enables on-the-fly PDF rendering and download functionality.
-
Clone the repository:
git clone https://github.com/WoongyuChoi/ReportCraft.git
-
Navigate into the project directory:
cd ReportCraft
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
To build for production:
npm run build
The project demonstrates how to use the @react-pdf/renderer
library to create dynamic reports with customizable layouts, headers, and tables.
Example usage:
import { PDFViewer } from '@react-pdf/renderer';
import FinancialReport from './layout/FinancialReport';
export default function App() {
return (
<PDFViewer style={{ width: "100%", height: "90vh" }}>
<FinancialReport />
</PDFViewer>
);
}
This project is licensed under the MIT License.