Translation

How to Translate a Document Without Losing Its Formatting

Translated documents break because most tools reduce your file to plain text, translate it, and then guess at where everything went. Tables scatter, columns merge, headers drop out. The fix is to use a translation engine that works on the document's real structure, and to match the engine to the file type: Office files, PDFs, and code each translate cleanly on different engines. This guide explains why formatting breaks and how to choose the right one for each job.

Updated August 27, 2026 · 8 min read

You upload a clean, finished document. You get back something that looks like it went through a shredder and was taped back together. The words are translated correctly, but the payment table has collapsed across two pages, the two-column layout is now one long ribbon of text, and the headers have melted into the body. Now you're facing an hour of cleanup that costs more time than the translation saved.

This is the single most common complaint in document translation, and it's almost never about language quality. It's about structure. Once you understand why it happens, the fix is straightforward, and it usually comes down to one decision: which engine you send the file to.

Why translation breaks formatting

A basic translator does three things in order: it strips the text out of your file, translates that text, and pours it back in. The problem is what gets lost in the first step. When the text comes out, the layout information stays behind, so the tool has to guess how to reassemble the page. Guesses are exactly what break tables and columns.

PDFs make this worse. A PDF isn't really a document in the way a Word file is. It's a set of instructions describing where marks go on a page, not what those marks mean. There's no reliable notion of "this is a table" or "this is the second column" baked in. So when a translator takes a PDF apart, it has to infer the structure before it can rebuild it, and if that inference is even slightly wrong, the layout falls apart.

What "keeping the formatting" actually means

Not all breakage is equal, and not all tools fail in the same place. When people say a translation "kept the formatting," they usually mean all of these survived intact:

  • Tables: rows, columns, merged cells and borders stay put, with translated text sitting in the correct cells.
  • Headers and footers: page numbers, titles and running headers survive across every page.
  • Multi-column layouts: two- and three-column pages don't collapse into a single stream.
  • Emphasis and hierarchy: bold, italics, heading levels and list indentation are preserved, not flattened.
  • Images and captions: pictures stay in position, and the text beside them gets translated too.

Some tools nail the text styling but destroy tables. Others keep images in place but flatten your columns. The goal is a tool that holds all of it together at once, which is far more likely when the tool translates your file's real structure instead of a flattened copy of it.

The real fix: match the engine to the file

Here's the part almost every guide skips. There is no single best translation engine for formatting. There's a best engine for each file type. A tool that translates a DOCX beautifully may refuse PDFs entirely; one that's flawless on PDFs may have a tight size limit. The trick isn't finding one magic engine. It's picking the right one for the job in front of you.

This is exactly why DocTranslating lets you choose the engine per file rather than forcing everything through one pipeline. Below is how the four engines actually compare, so you can match them yourself.

EngineBest forFile typesSize limitWatch out for
Microsoft AzureOffice files (Word, PowerPoint, Excel)DOCX, PPTX, XLSX, HTML, MD, TXT20 MBNo direct PDF support
Google CloudMost consistent all-round results, incl. PDFPDF, DOCX, PPTX, XLSX10 MBSmallest size cap
DeepLHighest translation quality on most pairsDOCX, PPTX, XLSX, TXT, HTML, SRT, and more30 MBOccasional layout issues on dense PDFs
GeminiCode files and mixed-language documentsPDF and code (JS, TS, Python, etc.)100 MB (25-page limit)Page limit on long PDFs
How the four engines compare for formatting-safe translation.

The Office-file trick for stubborn PDFs

If you have a PDF that keeps coming out mangled, there's a reliable workaround the professionals use: don't translate the PDF. Convert it to Word first, translate the Word file (where the structure is explicit and Azure shines), then convert back to PDF if you need to. It adds a step, but because a Word file actually stores its structure instead of just its appearance, the result holds together far better than translating the PDF directly.

The reason this works is simple: a Word file stores its formatting as structure, so it survives translation intact, while a PDF only stores appearance, which has to be reconstructed and often breaks.

What about scanned documents?

There's one case where none of this works out of the box: a scanned PDF. A scan is a photograph of a page, so there's no text to translate at all, just pixels. Before you can translate it, the text has to be recognised and lifted off the image. That's OCR.

DocTranslating's OCR tool handles this, reading text off scans in over 50 languages, including handwriting, so a scanned contract or an archived certificate becomes translatable like any other document. If you want the full walkthrough, there's a dedicated guide on extracting text from a scanned PDF.

A checklist before you send anything out

Whatever engine you use, spend two minutes reviewing the result before it goes to a client or an office. Open the original and the translation side by side and check:

  1. Do the tables still line up, with the right text in the right cells?
  2. Are the headers, footers and page numbers present on every page?
  3. Did any multi-column or two-column sections stay in their columns?
  4. Is anything overflowing its box or spilling past the margin (usually text expansion)?
  5. Are bold, italics and heading levels still where they belong?

Catching a shifted table now takes a moment. Catching it after a client points it out costs a lot more.

Putting it together

Formatting survives translation when two things are true: the tool works on your document's real structure rather than a flattened copy, and the engine actually supports the file type you're feeding it. Match Office files to Azure, PDFs to Google, quality-critical work to DeepL, and code or mixed-language files to Gemini, and most of the reformatting nightmare simply disappears.

New to the platform? The full guide to using DocTranslating walks through uploading a file, picking an engine and downloading your translated document.

Frequently asked questions

How do I translate a PDF without losing formatting?

Use a translator built for PDFs that preserves layout rather than flattening the file to plain text. On DocTranslating, Google Cloud is the most consistent engine for PDFs. For a stubborn PDF, converting it to Word first, translating that, and converting back often gives the cleanest result, because a Word file stores its structure explicitly while a PDF only stores its appearance.

Which engine is best for Word, PowerPoint and Excel files?

Microsoft Azure is the strongest for Office formats. It keeps DOCX, PPTX and XLSX files looking like the original because it translates the document's underlying structure rather than reconstructing the layout from scratch.

Why does my translated document look broken even though the translation is correct?

Because translation accuracy and formatting are two separate problems. Most tools strip the text out, translate it, and then guess how to put the page back together. The words come out right, but the guessed-at layout breaks: tables scatter, columns merge, headers drop out. Using a tool that works on the file's real structure avoids this.

Can I translate a scanned PDF?

Yes, but it needs an extra step. A scan is an image, so there's no text to translate until OCR reads the text off the page. DocTranslating's OCR tool recognises text in over 50 languages, including handwriting, and turns a scan into a translatable document.

Which engine should I use for code or documents that mix languages?

Gemini. It's the only one of the four engines that translates code files (JavaScript, TypeScript, Python and others) and the only one that handles documents mixing more than one source language. It accepts files up to 100 MB but is limited to 25 pages.