Skip to content

Quick start with Node.js

Learn how to send your first request using Node.js.

This section will guide you through the process, showcasing how to integrate Doppio's API for HTML to PDF or PNG conversion into your Node.js application

❶ Prerequisites

To get the most out of this guide, you’ll need to register to Doppio.

Go to the dashboard and grab your API key, dont worry the free plan is free for ever.

❷ Send a request

The easiest way to produce a PDF document from the URL https://www.spacejam.com/1996/ and save it on your computer is by employing the direct download technique.

Render PDF

Direct method

The direct method delivers the PDF straight to the client for instant download. This method is particularly effective for scenarios where immediate user download of the generated PDF is desired.

Synchronous method

Contrastingly, the synchronous method provides a JSON response containing elements such as documentUrl. This proves beneficial for saving the URL of the created file or for additional processing within your app.

✨ Tadam!

The Asynchronous Approach

Should your project necessitate asynchronous response handling via a webhook, our asynchronous method is highly recommended.

This method excels in scenarios where integrating a webhook to handle background processes is essential. It's particularly advantageous for systems processing extensive document batches, requiring autonomous real-time updates, or integrating PDF (or images) generation within broader, automated workflows.

Utilizing our asynchronous method not only maintains the responsiveness and efficiency of your application but also adeptly manages complex or lengthy operations.

Need more?

Are you looking for a specific framework? Check out our quickstarts by category.

All rights reserved