pdfn
Dev server and CLI for pdfn. Run with npx — no install needed.
Commands
pdfn dev
Start dev server with live preview:
npx pdfn dev
npx pdfn dev --open
Options:
--port | 3456 | Port for the dev server |
--open | — | Open browser automatically |
--mode | — | Load additional .env.[mode] files |
pdfn add
Add templates to your project:
npx pdfn add invoice
npx pdfn add invoice --tailwind
npx pdfn add --list
Templates: invoice, letter, contract, ticket, poster, report
Usage
import { pdfn } from '@pdfn/react';
import Invoice from './pdfn-templates/invoice';
const client = pdfn();
const { data, error } = await client.generate({ react: <Invoice /> });
if (error) {
console.error(error.message);
return;
}
License
MIT