docx-to-pdf conversion reflowed the counterparty's redline - the agent diffed the converted PDF against the original...
Fixes version comparison that flags everything because one side was converted between formats and the conversion reflowed the text. Use when a redline diff reports the whole document as changed after a docx-to-PDF conversion, or the diff shows reflow noise instead of edits. Key trigger: exactly one side of the comparison went through a format conversion.
TL;DR: Never compare a converted file against a native one. Extract plain text from the original .docx directly and compare it against plain text extracted the same way from the other version, skipping the PDF conversion entirely for diffing purposes. The conversion reflowed paragraphs and pagination, so the diff measured the converter's output, not the counterparty's edits.
docx-to-pdf conversion reflowed the counterparty's redline - the agent diffed the converted PDF against the original docx and flagged everything- Confirm the conversion is the noise source. Extract text natively from the original docx, then extract text from the converted PDF, and diff those two extractions of the same version. Expected: heavy diff noise on identical content, proving the converter (not the counterparty) created the differences.
- Drop the conversion from the diff path. Read the .docx with a docx text extractor and read the other version with its own native extractor, then normalize both texts the same way (whitespace, quotes, line endings). Expected: the known-unchanged sections now diff clean.
- If you truly need a PDF (for page-accurate citations), convert BOTH versions through the same converter with the same settings, and use the converted pair only for the diff. Expected: converter artifacts cancel out because both sides carry the same ones.
- Re-run the comparison and validate. Check three known edits and three known-unchanged passages. Expected: the diff flags exactly the real edits and nothing else.
- Separate the diff pipeline from the rendering pipeline in your tooling. Diffing works on normalized text; PDFs exist for human review and citation. Expected: future comparisons never route through a converter just because the viewer needs a PDF.
Use this when
- a docx redline converted to PDF diffs as "everything changed" against the original docx
- the diff noise looks like reflow (moved line breaks, shifted paragraphs) rather than word edits
- only one side of the comparison passed through LibreOffice, Word export, or any converter
- the counterparty sent a .docx and your pipeline insists on PDF before diffing
Not for this skill when
- both versions are native PDFs and the diff is noisy (check OCR noise or reflow handling instead)
- both sides went through the same converter and the diff is still noisy (check the converter settings or normalization)
- the diff is clean but the agent's summary of it is wrong (check the summarizer)
Variant phrasings
- converted redline docx to PDF and the diff flagged the whole document
- docx to PDF conversion broke the version comparison
- agent diffed converted PDF against original docx, everything showed as changed
- LibreOffice conversion reflowed the text before diffing
Why it happens
Format converters re-render the document: they reflow paragraphs to fit pages, substitute fonts, and re-paginate. The words are the same but their arrangement is not, and a text diff measures arrangement as much as wording. Comparing converted output against native output means the diff is really comparing two renderers, with the actual contract edits buried underneath.
Edge cases
- Tracked changes inside the docx need to be accepted or rejected before text extraction, or the deleted runs pollute the native text too.
- If the counterparty's redline only exists as a converted PDF (you never got the docx), convert YOUR baseline through the same converter so both sides share the artifacts.
- Converter versions matter. Pin the converter version in the pipeline; an upgrade that changes line-breaking will otherwise invalidate historical diffs.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_3voeN-CSErgujYqf9I8fXA