Skip to content
Start a project
Build notesEngineeringArchitecture1 Nov 20263 min read

One document, three renderers: how we keep them in step

A proposal exists on screen, as a PDF and as a Word file. One description, three drawers, and a test that reads all three back and compares them.

Valentir Engineering Desk

Architecture diagram: One document, three renderers: how we keep them in step

A document the studio sends, whether a proposal, a statement of work or an invoice, is drawn in three places: on screen, as a PDF and as a Word file. The risk with three copies is that they quietly stop agreeing. A clause is renumbered in one, a table row is dropped in another, and a client signs something slightly different from what the team approved.

The fix is not discipline. It is to keep one description of the document, make every renderer draw that description, and test the three outputs against each other.

One description, a closed list of parts#

The body of a document is written as blocks, from a fixed list of twelve kinds. Four are the classic ones: heading, paragraph, list and table. Eight were added for the longer documents: numbered clauses, label-and-value fields, callouts, scope tables, column grids, signature blocks, QR codes and page breaks. The list is closed on purpose. A new kind is a change to the library, to every renderer and to the written spec, not a class name someone adds to a template.

Three renderers#

The screen and the client portal draw the blocks as web markup. The PDF is made by printing that same web page in a real browser, so it cannot drift from the screen. Word is the odd one out: its file is built separately, with a drawer for each kind of block, because Word does not read web pages.

The test that keeps it true#

The parity test renders one document that holds every classic block kind and every kind of text styling. It then reads the text out of the screen version, out of the PDF's print HTML and out of the finished .docx, in order, and compares them line by line: the same content, the same order, the same numbering, the same numbers. A block kind with no Word drawer fails the build before the test even runs, because the types require one.

The eight newer kinds each have a structure test that reads their text and layout out of a real .docx and compares them with what the page shows, and every sample sheet in the golden set is held to the page's text.

There is a second guard in the product itself. A document that holds a block kind one of its surfaces cannot draw is held back by the send flow with a plain message, so a half-drawn document never reaches a client. Until 31-10-2026 that rule was live for Word, which could not yet draw the eight newer kinds. It now draws all twelve, and a second test holds the list of drawn kinds to what the real exporter does, in both directions.

What it does not prove#

The comparison covers text, order and numbers. It does not compare pixels. Word and a browser paginate differently, so a page break can land in a different place, and a table that looks cramped in Word would still pass. Those need a person to open the file.

It is also not finished. The panel knows 36 kinds of document. Eleven of them were added on 31-10-2026 as skeletons, and a kind that is not ready is never offered, created, approved or sent until its content is written. Those figures were read from the repository on 01-11-2026.

This is part of the internal panel we built to run the studio, which another note describes. The money in these documents comes from one price list. Valentir Technologies LLP is a software studio in Noida, and custom software is the practice that builds systems that have to produce documents like these.

Get our notes by email

We email our notes when we publish something worth your time.

We use your email only to send these notes, when we publish something worth your time. How we handle it is on our privacy page.

Search on Google and want more notes like this in your results? Add Valentir as a preferred source on Google.

If you want to argue with any of this, that is what hello@valentir.in is for.

Start here

Tell us what you want to build.

One call, a deterministic technical scope, and a 100% fixed price. From architecture to launch, we engineer software that drives real business results.

Contact UsChat on WhatsApp