basilysf1709 / react-print-pdf

Build and generate PDF using React πŸ“„ World's first UI kit for PDFs and print documents. Simple, reusable components and templates to create great invoices, docs, brochures. Use your favorite front-end framework React to build your next PDF.

Home Page:https://react.onedoclabs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React email cover

React Print
The new way to build documents.
High-quality, unstyled components for creating PDFs.


Demo Highlights πŸŽ₯

demo_react-print-pdf_onedoc.mp4

Key Features 🎯

  • Easy to use: Build your first PDF with react-print-pdf in less than 5 minutes.
  • Open source: Freedom is beautiful, and so is Onedoc. React-print-pdf is open source and free to use.
  • Components & Templates: Kickstart your next document by using our list of components and template created by Onedoc's Team and the community.
  • Marketplace: Share your latest templates and components with the community and contribute to the future of react-print-pdf

Introduction ℹ️

A collection of high-quality, unstyled components for creating beautiful PDFs using React and TypeScript. Forget about docx, latex, or painful outdates libraries. With react-print, embrace a new way to create PDFs, designed by and for developers.

Why ❓

We believe documents are at the core of communicationβ€”invoices, contracts, resumes, brochures, etc. They are the primary method for exchanging information with others professionally. So, why do we continue to use decades-old technology to create them? We believe you deserve better. Document production needs to be modernized. Start today and create your next PDF the same way you build a web app. And yes, this includes automating data integration into your documents. Say hello to react-print.

Getting started πŸš€

1. Installation πŸ’Ώ

Get the react-print component library.

With npm

npm install -s @onedoc/react-print

With yarn

yarn add @onedoc/react-print

With pnpm

pnpm add @onedoc/react-print

2. Import component β†ͺ️

Import the components you need to your PDF template from our list of pre-build components :

import { PageTop, PageBottom, PageBreak } from "@onedoc/react-print";

3. Integrate in your document πŸ“„

Integrate your components and include styles where needed.

export const document = ({ props }) => {
  return (
    <div>
      <PageTop>
        <span>Hello #1</span>
      </PageTop>
      <div>Hello #2</div>
      <PageBottom>
        <div className="text-gray-400 text-sm">Hello #3</div>
      </PageBottom>
      <PageBreak />
      <span>Hello #4, but on a new page ! </span>
    </div>
  );
};

Components πŸ—‚οΈ

A set of standard components to help you build amazing documents without having to deal with the mess of creating complex layouts and maintaining archaic markup. Help us extend this list by actively contributing and adding your favorite components!

Note

Help us extend this list by actively contributing and adding your favorite components!

Integrations πŸ”—

PDF created with react-print can be generated, hosted (and more) with your preferred document management providers.

  • Onedoc (our preferred system)
  • Others (coming soon..)

Contributing πŸ«‚

This project is open-source and is intended to be maintained and built by and for developers.

Wanna help ? Awesome! There are many ways you can contribute ! Take a look at:

Authors πŸ§‘β€πŸ’»

License πŸ“œ

License

Join the movement ! πŸš€

Contributors ✨

Star History 🌟

Star History Chart

GitHub Repo stars Discord X (formerly Twitter) Follow


About

Build and generate PDF using React πŸ“„ World's first UI kit for PDFs and print documents. Simple, reusable components and templates to create great invoices, docs, brochures. Use your favorite front-end framework React to build your next PDF.

https://react.onedoclabs.com/

License:Apache License 2.0


Languages

Language:TypeScript 75.7%Language:MDX 20.3%Language:CSS 4.0%