PDiffy 1.0.0-rc.4

This is a prerelease version of PDiffy.
dotnet add package PDiffy --version 1.0.0-rc.4
                    
NuGet\Install-Package PDiffy -Version 1.0.0-rc.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PDiffy" Version="1.0.0-rc.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PDiffy" Version="1.0.0-rc.4" />
                    
Directory.Packages.props
<PackageReference Include="PDiffy" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PDiffy --version 1.0.0-rc.4
                    
#r "nuget: PDiffy, 1.0.0-rc.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PDiffy@1.0.0-rc.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PDiffy&version=1.0.0-rc.4&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PDiffy&version=1.0.0-rc.4&prerelease
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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