Table of Contents

How fidelity is measured

DocWright's goal is output that can't be told apart from Word's own "Save as PDF". That isn't a claim made by eye: it is measured automatically, document by document, on every change.

The method

  1. A test corpus. Documents chosen to exercise one area each: styles, tables, images and wrapping, sections and columns, numbering, Arabic, Hebrew and CJK, legacy .doc, shapes, charts, forms, fonts, encrypted files, HTML, RTF, Markdown and text. Many of the examples on this site come from it.
  2. Word's own output as the reference. Each document is exported to PDF by Microsoft Word, and that PDF is kept as the reference.
  3. Pixel comparison. DocWright renders each document, and both PDFs are rasterized and compared pixel by pixel, along with the position of every line of text.
  4. A ledger that only moves one way. Each document's measured distance from Word is recorded. A change that moves any document further from Word fails the build. Improvements are recorded and become the new floor.
  5. Output hashes. A hash of every output DocWright produces is recorded too, so no output can change without anyone noticing.

Both renderers are checked: the PDF renderer against Word, and the image renderer against the PDF renderer. They draw the same laid-out pages, so any disagreement is a bug in one of them.

Where Word differs from the specification

Word doesn't always do what the Office Open XML specification says. Where they differ, DocWright follows Word, because Word's output is what users compare against. Each difference is measured, written down, and implemented as a general rule rather than a special case for one document.

What this means for you

  • Text breaks onto the same lines, and pages break in the same places, as in Word, provided the same fonts are available. See Fonts.
  • Remaining differences are small, and each document's is tracked and may only shrink.
  • Features that aren't supported yet, such as some shape effects or drawing revision marks, are reported as diagnostics rather than silently misdrawn.