HackerTrans
TopNewTrendsCommentsPastAskShowJobs

ftwum

no profile record

Submissions

Most players never finish their games (median 36% completion)

twoaveragegamers.com
3 points·by ftwum·20 hari yang lalu·0 comments

Show HN: React components for generating beautiful PDFs

github.com
1 points·by ftwum·4 bulan yang lalu·5 comments

comments

ftwum
·20 hari yang lalu·discuss
[dead]
ftwum
·4 bulan yang lalu·discuss
Sorry, I had the wrong link on there and updated to this: https://fred-7da601c6.mintlify.app/introduction
ftwum
·4 bulan yang lalu·discuss
Sorry, I had the wrong link on there and updated to this: https://fred-7da601c6.mintlify.app/introduction
ftwum
·4 bulan yang lalu·discuss
I built an open-source library of React components for creating PDF documents: invoices, reports, certificates, data tables, etc.

The problem: every time I've needed to generate a PDF in a web app, I've spent 2-3 days fighting with page breaks, orphaned headings, table overflow, and headers/footers. Whether it's Puppeteer, jsPDF, or one of the dozen hosted APIs, the DX always feels like 2014.

So I built @docuforge/react-pdf, a set of composable React components that handle the hard parts:

- Smart page breaks (no more split table rows or orphaned headings) - Auto-paginating tables with repeating headers - Headers/footers with page number interpolation - Full CSS support (Flexbox, Grid, @media print) - TypeScript-first with autocomplete for every prop

Quick example:

    import { Invoice, LineItem, InvoiceTotal } from '@docuforge/react-pdf';

    <Invoice>
      <LineItem description="Consulting" qty={10} rate={150} />
      <InvoiceTotal subtotal={1500} tax={135} total={1635} />
    </Invoice>
GitHub: https://github.com/Yoshyaes/docuforge npm: npm install @docuforge/react-pdf Docs: https://fred-7da601c6.mintlify.app/introduction

I'm also building a hosted PDF generation API on top of this (HTML or React in → PDF out, no Chrome to manage), but the component library is fully open source and works standalone with Playwright/Puppeteer.

Would love feedback on the component API design. What PDF problems have you had that this doesn't solve?