evilblog new | latest | rss | submit | about me

html2realpdf: Why I Built This Library

0 points · 17 visits by admin 34 days ago | published | html,pdf,artificial-intelligence,ocr,technology,software

In a few projects I worked on, the generated PDFs were honestly very poor.

I am not only talking about how they looked. There were often problems with optimization, structure, and the overall quality of the document. Those problems became even more obvious when we had to use those PDFs with artificial intelligence.

When a document is not built properly, you often end up having to use OCR just to extract the information from it. That means consuming resources for the client, but also for us when we use APIs, external services, or tools such as Dockling, for example.

That is where the idea for html2realpdf started.

The goal is quite simple: start with well-structured HTML and generate better, cleaner PDFs that are also easier to use in artificial intelligence workflows. A document should not only be readable by a person. It should also be structured properly enough to be understood by a machine.

The technology taboos we do not question

I believe there are many taboos in the technology world. By taboos, I mean all those things we rarely question because we trust the standards, or because we have that confirmation bias that makes us think:

> “Things have always been done this way.”

So we keep doing them in the same way.

Very few people stop to ask whether that approach is still the best one. Whether there is a problem that needs to be solved. Whether it is possible to get something better out of a technology or process we use every day.

For me, PDF generation is one of those cases.

It is something we take for granted. We generate a document, open it, see that it more or less works, and move on. But when that document becomes part of a larger system, perhaps one connected to an artificial intelligence model, all of its problems start to matter much more.

Building better foundations

This is why I decided to build html2realpdf.

I did not simply want to create yet another library for generating PDFs. I wanted to question a piece of technology that is often considered a solved problem, even though it can still be improved quite a lot.

I like looking for these taboos. I like understanding which things we do out of habit, and trying to see whether there is a more effective way to do them.

I believe this is especially important today, while we are building more and more products and processes based on artificial intelligence. If the foundations are fragile, everything we build on top of them can be fragile too.

Better PDFs, better-structured documents, and less need to rely on OCR and additional services may sound like small details. But when those details multiply, they can make a big difference in terms of cost, resources, and the quality of the final result.

html2realpdf was born from a very simple question:

> Can we do this better?

I believe it is always worth trying to find the answer.

The library

You can find the project on GitHub:

html2realpdf on GitHub


0 comments

add comment

no comments yet

Copyright 2026 © imggion
powered by v0.1.5