About Services Tools Blog Contact us

Layout Preserving PDF Translation

Translates a designed technical flyer into British English and writes the new text back into the original boxes, colours and alignment.

  • Translation
  • Water utilities
  • Pipeline
  • Productised
  • Hybrid
  • 2026

The problem

A distributor needs English sales flyers, but the manufacturer's artwork is a designed PDF. Redrawing each flyer loses the diagrams, colours and logo layout. A plain text export is not a flyer, so the distributor has had nothing usable to hand out.

What it does

Each page is read as blocks of text with position, font, size, colour and alignment, and sent as one group to Gemma running locally through Ollama, with a glossary of valve and pipework terms. Product names, type codes and units stay as printed. The original lettering is covered with the page's background colour and the English is fitted into the same boxes. Each source PDF gets an English PDF beside it.

Outcomes

  • English sales flyers keep the manufacturer's diagrams and type lockup.
  • Technical terms come from the glossary instead of a fresh guess on each block.
  • Codes and units come out exactly as printed.
  • Each source PDF gains one English companion and no new design file is needed.

Simplified mockup

Interactive preview with sample data. Nothing is sent to a server.

Flyer proof

Source flyer · German · diagram locked

Durchflussregelung

Wirbelregler für Regenstausysteme

Type VR-180 kept
Abb. 1 · Wirbelkammer

Abflussdrosselung ohne Fremdenergie

Sollabfluss 15 bis 80 l/s
Stauhöhe bis 6 m
Nominal size kept DN 200 · PN 10
Werkstoff 1.4301

Verstopfung wird durch die Wirbelkammer vermieden.

DE Quelle · deutsch · Zeichnung bleibt

Text blocks

Page 1 · read before translation
IdTextBoxSizeAlignRule
1Durchflussregelung18, 14, 92, 811leftglossary
2Wirbelregler für Regenstausysteme18, 24, 148, 1216lefttranslate
3VR-180172, 16, 32, 1214rightkeep
4Abflussdrosselung ohne Fremdenergie118, 52, 96, 1612leftglossary
5Sollabfluss 15 bis 80 l/s118, 74, 46, 1411lefttranslate
6DN 200 · PN 10168, 92, 46, 1411leftkeep
7Werkstoff 1.4301168, 110, 46, 1411lefttranslate
8Abb. 1 Wirbelkammer18, 148, 70, 89lefttranslate
One batch for the whole page
<seg id="1">Durchflussregelung</seg> <seg id="2">Wirbelregler für Regenstausysteme</seg> <seg id="3">VR-180</seg> <seg id="6">DN 200 · PN 10</seg>

Ids 3 and 6 are marked keep, so the model must return them unchanged.

Flow-control glossary

These terms are fixed in the prompt. A block is not allowed to invent a fresh equivalent.

GermanBritish EnglishUse
Abflussdrosselungdischarge throttlingdeck line on this flyer
Durchflussregelungflow controleyebrow
Regenstausystemstormwater detention systemtitle
Wirbelreglervortex regulatorproduct class
Sollabflusstarget dischargespec box
Stauhöheheadspec box
Verstopfungblockagecallout
Drosselschieberthrottle penstockrelated sheet
Left as printed
VR-180 DN 200 PN 10 1.4301 l/s 6 m

How it works

  1. Read each page as blocks of text with box, font size, colour, weight and alignment.
  2. Send the page as one group, with a glossary of technical terms.
  3. Require product names, type codes and units to stay as printed.
  4. Cover the original lettering with the background colour taken from the page.
  5. Fit the English into the same boxes.
  6. Write a companion PDF with an English suffix.

Pipeline

flowchart LR
  Pdf[Flyer PDF] --> Blocks[Read text blocks]
  Blocks --> Batch[Translate the page]
  Glossary[Engineering glossary] --> Batch
  Batch --> Cover[Cover original glyphs]
  Cover --> Fit[Fit English into the boxes]
  Fit --> Out[English PDF]