This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/web/pdf-generation/nextjs.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Next.js PDF generation library | Nutrient

Nutrient Web SDK is a JavaScript library for generating PDF documents in any Next.js-based web app. Newly created PDFs can be rendered in our client-side viewer for signing, editing, form fill, and more.

Key capabilities

  • Create from template — Insert text or images and prefill forms
  • Generate from images — Convert JPGs, PNGs, or TIFFs into PDF
  • Assemble documents — Merge multiple PDFs and insert pages
  • Thumbnail previews — Render pages as thumbnail images
  • Saving options — To an ArrayBuffer, local storage, or remote server
  • Headless — Generate PDFs without showing the UI
  • Client-side — Create PDFs directly in a browser (no server needed)
  • Extendable — Add viewing, forms, signing, annotation, and more

Guides for PDF generation

Generate a PDF from a PDF template
How to generate a PDF using an existing PDF document as a template

Generate a PDF from a Word template
How to generate a PDF using an existing Word document as a template

Generate a PDF from a form
How to generate a PDF from a PDF form

Generate a PDF from images
How to generate a PDF from a PNG, JPG, or TIFF

Generate PDF reports
How to create a PDF report by adding text and images to a template

Generate thumbnail previews
How to render PDF pages as thumbnail images

Start your free trial for unlimited access and expert support.

FAQ

Nutrient Web SDK generates PDFs in the browser from a Next.js client component. It creates PDFs from PDF templates, Word templates, PDF forms, and PNG, JPG, or TIFF images, with no server required.

Next.js handles routing and the React UI, and Nutrient Web SDK runs in a client component. Documents are generated in the user’s browser, so files aren’t uploaded to a server for processing.

Put the styling in the template. A PDF or Word template keeps its fonts, colors, and layout while Nutrient Web SDK fills in the data. To convert HTML and CSS to PDF, use Web SDK with Document Engine.

Yes. Nutrient Web SDK generates PDFs client-side. In Next.js, load it in a client component ("use client"), because it needs window. For server-side generation, such as HTML-to-PDF, use Document Engine.

Common challenges include handling complex layouts, managing large datasets, and ensuring consistent rendering across different browsers and PDF viewers.