Skip to content

Dynamic PDF generation using React Renderer with customizable layouts and data-driven content.

License

Notifications You must be signed in to change notification settings

WoongyuChoi/ReportCraft

Repository files navigation

ReportCraft

React License Platform GitHub release (latest by date)

Overview

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.

Features

  • 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.

Setup

  1. Clone the repository:

    git clone https://github.com/WoongyuChoi/ReportCraft.git
  2. Navigate into the project directory:

    cd ReportCraft
  3. Install dependencies:

    npm install
  4. Start the development server:

    npm run dev
  5. To build for production:

    npm run build

Usage

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>
  );
}

License

This project is licensed under the MIT License.