Inspiration

The story behind Doppio

The story behind Doppio

The story behind Doppio

Why we created it: the inspiration behind Doppio's creation

Microservices can be problematic for various reasons and are best avoided if your project, team size, or other factors are still suited to a well-designed monolithic architecture.

From my decade-long experience in web platform and product development, a recurring challenge is the need to create PDF files. This necessity arises for various purposes, such as exports, invoices, or attaching data in emails.

Focusing on web applications, it's clear that your app likely already generates web pages using HTML. This brings us to the topic at hand: generating PDFs at scale from HTML sources.

Unfortunately, there's no standout library that excels in converting HTML to PDF efficiently. This conclusion comes from extensive testing of available libraries. The current options are:

1. Libraries depending on outdated, unmaintained binaries on your server.

2. Libraries using complex, non-standard template systems, resulting in subpar documents.

3. Browser-only libraries that essentially produce PDFs as large images.

4. Libraries limited to a subset of HTML and CSS, unable to execute JavaScript, problematic for React or Vue.js apps.

5. Tools like Puppeteer, which work with Headless Chrome, emerge as the only reasonable choice.

Puppeteer, especially with Node.js, offers a straightforward approach to PDF generation. For non-Node.js environments, wrappers are available that leverage Headless Chrome's devtool API. Puppeteer stays updated with Chrome's latest versions, making it the preferred choice.

A basic Puppeteer script can quickly generate a PDF. However, scaling this solution is challenging. Generating PDFs concurrently for multiple users can overload your server with multiple Chrome instances, leading to system failure.

Scaling this solution involves complex queues, microservices, and advanced technologies, adding to your workload.

Originally, the task seemed simple: convert HTML to PDF. To address this complexity and help others, we developed Doppio, an API service that efficiently converts HTML to PDF, offering a substantial free tier.

Doppio can scale infinitely to render PDF documents or screenshots from HTML sources or URLs. It includes advanced features like asynchronous rendering and file upload to your storage.

Using Doppio is as simple as an API call, with parameters mimicking Puppeteer's documentation (Puppeteer API). It also speeds up CI/CD processes by eliminating the need to install Chrome binaries and dependencies in your system.

For more information or support, visit the Doppio support chat or check out our documentation at Doppio Docs.

Microservices can be problematic for various reasons and are best avoided if your project, team size, or other factors are still suited to a well-designed monolithic architecture.

From my decade-long experience in web platform and product development, a recurring challenge is the need to create PDF files. This necessity arises for various purposes, such as exports, invoices, or attaching data in emails.

Focusing on web applications, it's clear that your app likely already generates web pages using HTML. This brings us to the topic at hand: generating PDFs at scale from HTML sources.

Unfortunately, there's no standout library that excels in converting HTML to PDF efficiently. This conclusion comes from extensive testing of available libraries. The current options are:

1. Libraries depending on outdated, unmaintained binaries on your server.

2. Libraries using complex, non-standard template systems, resulting in subpar documents.

3. Browser-only libraries that essentially produce PDFs as large images.

4. Libraries limited to a subset of HTML and CSS, unable to execute JavaScript, problematic for React or Vue.js apps.

5. Tools like Puppeteer, which work with Headless Chrome, emerge as the only reasonable choice.

Puppeteer, especially with Node.js, offers a straightforward approach to PDF generation. For non-Node.js environments, wrappers are available that leverage Headless Chrome's devtool API. Puppeteer stays updated with Chrome's latest versions, making it the preferred choice.

A basic Puppeteer script can quickly generate a PDF. However, scaling this solution is challenging. Generating PDFs concurrently for multiple users can overload your server with multiple Chrome instances, leading to system failure.

Scaling this solution involves complex queues, microservices, and advanced technologies, adding to your workload.

Originally, the task seemed simple: convert HTML to PDF. To address this complexity and help others, we developed Doppio, an API service that efficiently converts HTML to PDF, offering a substantial free tier.

Doppio can scale infinitely to render PDF documents or screenshots from HTML sources or URLs. It includes advanced features like asynchronous rendering and file upload to your storage.

Using Doppio is as simple as an API call, with parameters mimicking Puppeteer's documentation (Puppeteer API). It also speeds up CI/CD processes by eliminating the need to install Chrome binaries and dependencies in your system.

For more information or support, visit the Doppio support chat or check out our documentation at Doppio Docs.

By Renaud Lataguerra

January 1, 2023