Skip to content

mrdiff 0.5.0

Choose a tag to compare

@github-actions github-actions released this 13 Sep 12:31
· 26 commits to main since this release

PDF text

The text of a PDF is now compared alongside the rendering, and reported separately — a re-exported proof whose fonts changed and a contract whose clause changed are different events:

$ mrdiff proof-v1.pdf proof-v2.pdf
PDFs differ — 1 of 12 pages
p.7  1 region
     top 69 mm, left 96 mm, 16 × 5 mm
  the text is identical — only the rendering differs (fonts, images, layout)

--text shows the text diff instead: one line per extracted line, [p.N] marking pages, with the character-level highlight. Annotations (FreeText notes, comments) and form-field values are included as [FreeText] … lines. A PDF with no text (scanned pages) says so.

$ mrdiff --text contract-v1.pdf contract-v2.pdf
text: 1 lines changed, 0 added, 0 removed
   12      - Article 3  Delivery by 31 October 2026.
        12 + Article 3  Delivery by 30 November 2026.

--json: pdf gains text: {result, changed, added, removed, lines_a, lines_b} (null when a side has no text); --text reports kind: "pdf-text". Nothing existing changed.

The README's speed table now has a text row: a 780 MB, ten-million-line log with two changed lines compares in 0.7 s (warm cache).


日本語

PDF の文字も見た目と並べて比べ、別に言います ──「文字は同じ、違うのは見た目だけ」と「文字が N 行違う」。--text で行 diff が出ます([p.N] がページの境、注釈とフォームの値も含む)。文字の無い PDF(スキャン)はそう言います。--json は pdf に text が増え、--text は kind: "pdf-text"。既存の形は変わっていません。


sha256: c7c9981a1135c83909e4b4c9eee0e601005b551ed95fd9aa9c4d8e3eba0f1b09