contentInserted, deleted, or replaced text.
Open source · local-first
Compare PDF or DOCX outputs, classify what changed, and keep a deterministic JSON contract plus an offline HTML report—without sending documents to a service.
First result
Use the .NET 10 dnx runner to generate two safe synthetic DOCX files and a complete report in about 30 seconds.
dnx DocRefract.Tool@0.2.4 -- demo --out report
report/index.html locally in any browser.Signal, not noise
Unlike a single opaque mismatch, DocRefract separates evidence into stable categories that can carry different release policies.
contentInserted, deleted, or replaced text.
formatFont, emphasis, color, or paragraph styling.
layoutMargins, page geometry, position, or reflow.
mediaMedia added, removed, replaced, or relinked.
visualSchema-reserved for future raster evidence; not emitted yet.
structurePages, paragraphs, rows, cells, or nodes.
CI adoption
The Action always uploads the HTML and JSON evidence. Start with continue-on-error, tune the policy, then remove that line to make prohibited changes block a pull request.
- name: Compare generated document
id: docrefract
continue-on-error: true
uses: jinyounghub/docrefract@v0.2.4
with:
before: test/baseline.pdf
after: build/report.pdf
fail-on: content,layout,media