# pdfn > Reliable PDF generation for Next.js using React components. ## Docs - [Components](https://pdfn.dev/docs/components.md): Reference for Document, Page, PageNumber, TotalPages, PageBreak, NoBreak, and table helper components. Includes props and usage examples. - [Dev Workflow](https://pdfn.dev/docs/dev-workflow.md): Run npx pdfn dev to start a local preview server with hot reload. Edit your React templates and see PDF changes instantly in the browser. - [Generate & Render](https://pdfn.dev/docs/generate.md): Create a pdfn client with pdfn(), then call generate() to produce a PDF buffer or render() to get self-contained HTML for self-hosted setups. - [Introduction](https://pdfn.dev/docs/introduction.md): Build PDF templates with React components. Pdfn handles pagination, headers, footers, and rendering — consistent output across local dev and production. - [Migrate from Puppeteer](https://pdfn.dev/docs/migrate-from-puppeteer.md): Replace raw Puppeteer PDF generation with pdfn React components. Step-by-step guide to convert HTML strings and page.pdf() calls to pdfn templates. - [Next.js](https://pdfn.dev/docs/nextjs.md): Generate PDFs in Next.js with App Router and Pages Router. Includes API route examples, download buttons, streaming, and edge runtime considerations. - [Quickstart](https://pdfn.dev/docs/quickstart.md): Install pdfn in a Next.js project, create a template, add an API route, and generate your first PDF. No API key required for local development. - [Send PDF email attachments with Resend](https://pdfn.dev/docs/resend.md): Generate invoices, receipts, and reports with pdfn and send them as email attachments using Resend. Includes Next.js examples for App Router and Pages Router. - [Self-Hosting](https://pdfn.dev/docs/self-hosting.md): Run PDF generation on your own infrastructure with Puppeteer or Playwright. Use client.render() to get HTML, then convert to PDF yourself. - [Styling](https://pdfn.dev/docs/styling.md): Style PDF templates with Tailwind CSS, custom stylesheets, or inline styles. Covers fonts, images, custom themes, and print CSS notes. - [Troubleshooting](https://pdfn.dev/docs/troubleshooting.md): Handle pdfn errors with the { data, error } response pattern. Includes error codes, common issues like connection failures, and step-by-step fixes. ## OpenAPI Specs - [openapi](https://pdfn.dev/docs/api-reference/openapi.json)