Learn how to use Doczilla with Next.js.
npm install @doczilla/node
// app/api/pdf/route.ts -> /api/pdf import Doczilla from '@doczilla/node' const doczilla = new Doczilla('doczilla-...') export async function GET() { const pdfBuffer = await doczilla.pdf.direct({ page: { html: '<div>Your first Doczilla PDF</div>' } }) return new Response(pdfBuffer, { headers: { 'Content-Type': 'application/pdf' } }) }
Was this page helpful?