Learn how to use Doczilla with Remix.
npm install @doczilla/node
// app/routes/api.pdf.ts -> /api/pdf import { LoaderFunctionArgs } from '@remix-run/node' import Doczilla from '@doczilla/node' const doczilla = new Doczilla('doczilla-...') export async function loader(args: LoaderFunctionArgs) { 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?