Appearance
Quick start with Next.js
Learn how to send your first request with Next.js.
This guide shows you how to integrate Doppio's API into a Next.js project so you can generate PDFs or screenshots from HTML.
Render your first PDF
Choose between the synchronous and direct methods depending on how you want to return the generated PDF to the client.
Synchronous method
The synchronous method returns a JSON response that includes fields such as documentUrl. Use it when you want to store the generated file URL or process it further in your app.
Direct method
The direct method streams the PDF back to the client as a file download. Use it when the user should receive the generated PDF immediately.
Here's how to set up each method in your Next.js app:
That's it.
Asynchronous method?
If your project needs webhook-based response handling, take a look at our asynchronous method.
This approach is useful when document generation should run in the background. It fits workflows that process large volumes of documents, trigger downstream automation, or should not block the user while rendering is in progress.
Need more?
Looking to integrate Doppio with a different framework? Explore our other quick start guides: