Engineering Journal
Ginexys
Ginexys

Why We Treat HTML as a CAD Format: The Design Principles Behind Ginexys PDF Processor

2026-06-03

TLDR

Most PDF extraction tools treat output generation as a one-way destination, dumping raw HTML and leaving structural fixes to the user. We designed GINEXYS PDF Processor around the principle that extracted HTML is a spatial CAD document in progress. By combining CSS Grid layout containers with inline DOM manipulation and Monaco code editing, users can restructure extracted documents directly in the browser without breaking semantic export targets.
Design ApproachLayout StrategyFlow IntegrityContext Switching
External Fix (Traditional)Open output in Word / IDEUnknownHigh (Switch tools post-extract)
Absolute Canvas Positioningposition: absolute canvasBroken (Elements fall out of document flow)None (But export fails)
DOM-as-CAD ArchitectureCSS Grid + DOM insertBefore100% Preserved (Browser reflows natively)Zero (In-place editing)

Perfect extraction is an algorithmic impossibility

When extracting complex PDFs, algorithms rarely produce 100% perfect layouts. Multi-column tables get split across pages, sub-headers misclassify as body text, and callout boxes disrupt vertical text order.

Traditional tools export this imperfect HTML and force developers into a tedious workflow: download the output, open an external editor, manually inspect markup, and fix layout errors in a separate environment.


Absolute coordinates break clean document exports

When attempting to build layout editors for web documents, tools often default to absolute positioning (position: absolute), allowing users to drag elements anywhere on screen.

However, absolutely positioned elements fall completely out of document flow:


Browser DOM flows act as native spatial coordinates

Browsers already treat HTML as a spatial CAD model:

           +-----------------------------------------+
           |      HTML DOM Spatial CAD Model         |
           |  CSS Grid Containers (.pdf-zone)        |
           |  - grid-template-columns: repeat(N, 1fr)|
           +-----------------------------------------+
                      /                   \
                     v                     v
          Column 1 (.pdf-col)        Column 2 (.pdf-col)
                  |                          |
                  v                          v
          Region Box (.pdf-region)   Region Box (.pdf-region)
                  |
         +--------+--------------------------+
         |                                   |
         v                                   v
     Edit Mode                         Selection Mode
(contentEditable text)             (HTML5 Drag & Drop)

The two-mode architecture

We exposed this native spatial model directly to the user on a single DOM surface:
Rule of thumb: Treat HTML as a structured spatial document rather than a flat string dump. Use native CSS Grid and DOM node mutation methods to provide visual layout editing while preserving semantic export pipelines.
Read this post in the full Engineering Journal →