Skip to content
MyDSHMy DSH Field Notes
中文
Independently maintained; not affiliated with DeepSeek. No association with mydsh.dev or other MyDSH sites.

Home/Workspace & files/Outputs & file changes

docx output under LibreOffice versus Word: what to check and how

The .docx the AI produced looks fine on your machine and breaks on someone else's.

To be testedVersion and environmentChecked 2026-11-14
Tool
python-docx available; LibreOffice not installed here
Status
no LibreOffice here, so this page lists checks instead of results
Checked
2026-11-14
Honest note: no LibreOffice on this machine, so a pixel-level comparison of one docx across two renderers is not possible here. This page lists what to check, not comparative results — the numbers come when there is an environment.

Misalignment in docx almost always comes from the items below. Their common trait: the spec leaves freedom, and renderers fill it differently.

Where it driftsWhyHow to check
Font fallback when missingThe named font is absent, a substitute has different metrics, lines reflowOpen on a machine without that font and see if it still fits one page
Line spacing and paragraph spacingMultiple spacing is rounded differentlyCheck whether paragraph count changes or widows appear
Automatic table column widthComputed from content by different algorithmsFix column widths, then compare
Pagination and widow controlDifferent implementation detailCheck whether key headings get pushed to the next page
Image and text wrappingWrapping implementations vary considerablyFocus on mixed image-text paragraphs
Tabs and indentsDefault tab stops differCheck alignment-by-tab areas like TOCs and signature blocks

Reduce risk at generation time

  • Use only ubiquitous fonts. No rare typefaces.
  • Use absolute line spacing (points, not a multiple).
  • Hard-code table column widths instead of leaving them automatic.
  • Avoid text boxes: the most drift-prone element.

Shortest verification path

  1. Generate the docx.
  2. Open in Word (or WPS) on your machine and export a PDF as the baseline.
  3. Open on another machine with another renderer and compare key pages: first, any with tables, last.
  4. Compare only those, not every word — structure matters, not pixels.

If you have no second renderer

Fallback: export the docx to PDF yourself. PDF layout is fixed, so comparing PDFs at least confirms your own layout is stable. It does not replace cross-renderer checking.

What counts as working

Check every line. All of them pass or the job is not done.

  • The four key spots are compared: first page, table page, last page, mixed image-text
  • Fonts exist on the target machine, or the fallback is acceptable
  • Table column widths are fixed, not automatic

Where it fails

Symptom, cause, what to do — written in the order it actually happens.

SymptomCauseWhat to do
Line spacing looks different on their machineMultiple spacing, rounded differentlySwitch to fixed points and regenerate
Table columns deform thereAutomatic widths are renderer-computedWrite explicit column widths

Sources

Verified means measured here. Compiled means every line carries a source.