Learn how to use Doczilla with Next.js.
Download the Node.js SDK using your favorite package manager.
npm install @doczilla/node
The package needs to be configured with your organizations API key, which is available on your organizations settings page.
// 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?