PDiffy 1.0.0-rc.4
dotnet add package PDiffy --version 1.0.0-rc.4
NuGet\Install-Package PDiffy -Version 1.0.0-rc.4
<PackageReference Include="PDiffy" Version="1.0.0-rc.4" />
<PackageVersion Include="PDiffy" Version="1.0.0-rc.4" />
<PackageReference Include="PDiffy" />
paket add PDiffy --version 1.0.0-rc.4
#r "nuget: PDiffy, 1.0.0-rc.4"
#:package PDiffy@1.0.0-rc.4
#addin nuget:?package=PDiffy&version=1.0.0-rc.4&prerelease
#tool nuget:?package=PDiffy&version=1.0.0-rc.4&prerelease
PDiffy
Compare, test and inspect PDF and Word documents in .NET. PDiffy reads what a reader, a screen reader or a viewer gets from a document: tag structure, text, alt text, reading order, tables, links, fonts, forms and layout. It ignores how the file is encoded and reports changes element by element, with accessibility changes first.
dotnet add package PDiffy
Test a generated document against its approved snapshot
[Fact]
public async Task TrailGuide_ShouldMatchApprovedSnapshot_WhenGenerated()
{
using Stream pdf = await ReportGenerator.CreateTrailGuideAsync();
// Compares it with a checked-in .verified.pdfua.txt file named after this test. A difference throws a
// SnapshotException that says what changed, on the page where it happened.
await Snapshot.VerifyPdfAsync(pdf);
}
Snapshot.VerifyDocxAsync, VerifyTextAsync and VerifyJsonAsync do the same for Word documents, text and JSON.
Compare two documents, or inspect one
PdfUaDocument before = PdfUaDocument.Load("guide-v1.pdf");
PdfUaDocument after = PdfUaDocument.Load("guide-v2.pdf");
Console.WriteLine(before.CompareTo(after).Describe());
Assert.Equal("en-US", after.Document.Language);
Assert.Empty(after.Check(PdfCheck.FigureAltText));
The pdiffy command-line tool, in the PDiffy.Cli package, does the same
outside of tests.
Documentation: pdiffy.dev, with guides, the snapshot formats and the full API reference.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- PdfPig (>= 0.1.16)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-rc.4 | 0 | 11/5/2026 |
| 1.0.0-rc.3 | 0 | 11/5/2026 |
| 1.0.0-rc.2 | 0 | 11/5/2026 |
| 1.0.0-rc.1 | 0 | 11/5/2026 |