Skip to content

Case study

High resolution HTML to PDF converter

Replaced a converter that produced 96 dpi PDFs with one that produces 300 dpi on a fixed page size, using only free and open source components as the brief required.

Overview

An application was converting HTML into PDFs at a fixed page size. On screen they looked correct. Printed, they were visibly poor, because the converter rasterised at ninety-six dots per inch and that is not enough for print.

The brief was to reach at least three hundred dots per inch on the same page size, and to do it without introducing any paid component or hosted service.

What I own

Diagnosis and the replacement conversion path.

Complexities tackled

The bug was a default nobody had questioned. The existing library rendered at screen resolution because that is what it does unless told otherwise, and the output looked fine on the machine where it was checked. Print quality problems are frequently this: a value that was never wrong on screen.

The no-paid-components rule was the real constraint. Plenty of libraries solve this immediately and charge for it. Ruling those out narrows the field to open source rendering paths, each with its own tradeoffs around fonts, page sizing and CSS support, which is where the actual work was.

Stack

C# against an open source rendering path, on a fixed page size.

Working on something similar?

Tell me what you are building and what is in the way. I will tell you honestly whether I am the right person for it.

Start a conversation

Last updated: