Installation
Use@markpdf/nextjs for Next.js App Router projects. It keeps MARKPDF_API_KEY on the server and gives you Route Handler and Server Action helpers.
Install
Configure the API key
Create or update.env.local:
NEXT_PUBLIC_.
Minimal route handler
app/api/convert/route.ts
FormData file to /api/convert; the API key never reaches the browser.
