Machine Learning for Layout Recognition

Since GrandTotal's early days, there was this vision: import an existing invoice as a PDF and create a functional layout from it. Now, only 17 years later, an early version is available. New users see it during onboarding. Existing customers can select a PDF via File/Import in the Layouts section.

The Problem

Creating layouts manually takes time: positioning text fields, choosing fonts, adjusting spacing, configuring tables. If you already have a PDF – why shouldn't the software derive a layout from it?

Because PDFs are complicated. They don't store "here's an address", only "here's text at position X/Y". No structure, no semantics.

The Solution

Machine Learning recognizes patterns: Where's the address? Which text blocks belong together? Where's the line items table? The technology analyzes the PDF, tries to understand the structure, and creates a layout framework.

The result is, with luck, a finished layout or at least a starting point for further work.

PDF Input

Original: Apple Pages Template

Layout Recognition Result

Converted: GrandTotal Layout

What Works

Well: Simple invoices with clear structure, readable fonts, clean tables. PDFs from professional software.

Less well: Complex layouts, multi-column design, unusual fonts, scanned documents, PDFs with lots of graphics.

Important

This is an early-phase experiment. It works better sometimes, worse other times.

Feedback via the Support page helps improve the technology.

How to Test It

New Users

Automatically during onboarding

Existing Users

In Layouts section via File/Import select a PDF

Privacy

All models run locally on your Mac

Missing Fonts

Substituted with available fonts

Feedback

Submit example PDFs helps improve the technology