agentic-net-examples / compare-pdf
AGENTS.md2 starsChanged 4 months agoMITView on GitHub
C# examples for compare-pdf using Aspose.PDF for .NET
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository36 other files it gives its agents.
- accessibility-and-tagged-pdfsAGENTS.md
- aspose-pdf-examplesAGENTS.md
- basic-operationsAGENTS.md
- conversionAGENTS.md
- documentAGENTS.md
- facades-acroformsAGENTS.md
- facades-annotationsAGENTS.md
- facades-bookmarksAGENTS.md
- facades-convert-documentsAGENTS.md
- facades-documentsAGENTS.md
- facades-edit-documentAGENTS.md
- facades-extract-images-and-textAGENTS.md
- facades-fill-formsAGENTS.md
- facades-formsAGENTS.md
- facades-metadataAGENTS.md
- facades-pagesAGENTS.md
- facades-secure-documentsAGENTS.md
- facades-sign-documentsAGENTS.md
- facades-stampsAGENTS.md
- facades-texts-and-imagesAGENTS.md
- facades-xmp-metadataAGENTS.md
- graphs-zugferd-operatorsAGENTS.md
- pagesAGENTS.md
- parse-pdfAGENTS.md
- securing-and-signing-pdfAGENTS.md
- stampingAGENTS.md
- uncategorizedAGENTS.md
- working-with-annotationsAGENTS.md
- working-with-attachmentsAGENTS.md
- working-with-formsAGENTS.md
- working-with-graphsAGENTS.md
- working-with-imagesAGENTS.md
- working-with-tablesAGENTS.md
- working-with-textAGENTS.md
- working-with-xmlAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 110
Create HtmlDiffOutputGenerator with parameterless constructor: new HtmlDiffOutputGenerator().
- Distinctive: line 111
Create HtmlDiffOutputGenerator with: new HtmlDiffOutputGenerator(OutputTextStyle textStyle).
- Distinctive: line 113
Create ComparisonOptions with parameterless constructor: new ComparisonOptions().
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS - compare-pdf
Compare PDF in PDF using C# / .NET -- 28 verified, compile-tested examples for Aspose.PDF for .NET 26.8.0. Each
.csfile is a standalone, build-validated console example, generated and runtime-checked by an AI agent before publishing.
Persona
You are a C# developer specializing in PDF processing using Aspose.PDF for .NET, working within the compare-pdf category. This folder contains standalone C# examples for compare-pdf operations. See the root agents.md for repository-wide conventions and boundaries.
Scope
- This folder contains examples for compare-pdf.
- Files are standalone
.csexamples stored directly in this folder.
Required Namespaces
using Aspose.Pdf;(28/28 files) ← category-specificusing Aspose.Pdf.Comparison;(27/28 files) ← category-specificusing Aspose.Pdf.Text;(4/28 files)using Aspose.Pdf.Annotations;(3/28 files)using Aspose.Pdf.Devices;(1/28 files)using Aspose.Pdf.Forms;(1/28 files)using System;(28/28 files)using System.IO;(27/28 files)using System.Collections.Generic;(12/28 files)using System.Drawing.Imaging;(2/28 files)using System.Threading.Tasks;(2/28 files)using System.Drawing;(1/28 files)using System.IO.Compression;(1/28 files)using System.Linq;(1/28 files)using System.Text.Json;(1/28 files)using System.Threading;(1/28 files)
Common Code Pattern
Most files follow this pattern:
using (Document doc = new Document("input.pdf"))
{
// ... operations ...
}Files in this folder
| File | Title | Key APIs | Description |
| batch-pdf-comparison-parallel | Batch PDF Comparison with Parallel Processing | Document, SideBySidePdfComparer, Compare | Demonstrates how to compare a large set of PDFs against a reference file using Aspose.Pdf's compa... |
| compare-encrypted-pdfs-side-by-side | Compare Encrypted PDFs Side‑by‑Side with Passwords | Document, SideBySideComparisonOptions, SideBySidePdfComparer | Demonstrates loading two password‑protected PDF files and performing a side‑by‑side visual compar... |
| compare-pdf-documents-page-by-page-diff | Compare PDF Documents Page by Page and Generate Diff PDF | Document, ComparisonOptions, TextPdfComparer | Demonstrates how to compare two PDF files page by page using Aspose.Pdf's default ComparisonOptio... |
| compare-pdf-text-ignoring-compression | Compare PDFs Textually Ignoring Compression Differences | Document, ComparisonOptions, CompareFlatDocuments | Demonstrates how to compare two PDF files that have identical content but different compression s... |
| compare-pdfs-detect-font-differences | Compare PDFs and Detect Font Differences | Document, ComparisonOptions, CompareFlatDocuments | Demonstrates how to compare two PDF files using Aspose.Pdf and report font changes as separate di... |
| compare-pdfs-different-page-sizes | Compare PDFs with Different Page Sizes | Document, Page, PageInfo | Shows how to align the page dimensions of two PDFs and use GraphicalPdfComparer to compare them, ... |
| compare-pdfs-generate-json-diff-report | Compare PDFs and Generate JSON Diff Report | Document, TextAbsorber, Visit | The example loads two PDF files, extracts their text page by page using Aspose.Pdf, identifies ad... |
| compare-pdfs-ignore-signature-fields | Compare PDFs While Ignoring Signature Fields | Document, Page, Annotation | Loads two signed PDFs, extracts the rectangles of all signature fields, excludes those areas from... |
| compare-pdfs-log-differences | Compare PDFs and Log Differences by Page | Document, ComparisonOptions, CompareDocumentsPageByPage | Shows how to compare two PDF documents page‑by‑page with Aspose.Pdf and write an audit log that r... |
| compare-pdfs-unicode-text-differences | Compare PDFs with Unicode Text and Detect Differences | Document, Page, TextFragment | Creates English and Russian PDFs, then uses Aspose.Pdf's comparison API to detect Unicode text di... |
| compare-pdfs-with-form-fields | Compare PDFs Including Form Field Values | Document, ComparisonOptions, CompareDocumentsPageByPage | Demonstrates how to compare two PDF documents, including form field values, and generate both a J... |
| compare-selected-pdf-pages-side-by-side | Compare Selected PDF Pages Side‑by‑Side | Document, ComparisonOptions, SideBySideComparisonOptions | Demonstrates how to compare specific pages of two PDFs using Aspose.Pdf's side‑by‑side visual com... |
| compare-specific-page-range-pdf | Compare Specific Page Range of Two PDFs | Document, ComparisonOptions, CompareDocumentsPageByPage | Loads two PDF documents, defines a page range, compares the selected pages using Aspose.Pdf's com... |
| compare-two-pdfs-aspdf-comparison | Compare Two PDFs Using Aspose.Pdf.Comparison | Document, ComparisonOptions, TextPdfComparer | Demonstrates how to compare two PDF documents with Aspose.Pdf, generating a result PDF that highl... |
| compare-two-pdfs-visual-diff | Compare Two PDFs and Generate a Visual Diff | Document, ComparisonOptions, CompareFlatDocuments | Demonstrates how to compare two PDF documents using Aspose.Pdf, generate a list of differences, a... |
| exclude-annotations-from-pdf-comparison | Exclude Annotations from PDF Comparison | Document, Page, Annotation | Demonstrates collecting annotation bounding rectangles from two PDFs and configuring SideBySideCo... |
| exclude-areas-from-pdf-comparison | Exclude Areas from PDF Comparison | Document, Rectangle, SideBySideComparisonOptions | Demonstrates how to define rectangular regions to exclude from each PDF and perform a side‑by‑sid... |
| exclude-footer-areas-in-pdf-comparison | Exclude Footer Areas in PDF Comparison | Document, Page, Rectangle | Demonstrates how to define rectangular exclude areas to omit footers when performing a side‑by‑si... |
| generate-diff-pdf-by-comparing-two-pdfs | Generate a Diff PDF by Comparing Two PDFs | Document, GraphicalPdfComparer, CompareDocumentsToPdf | Demonstrates how to use Aspose.Pdf to compare two PDF documents and create a highlighted diff PDF... |
| generate-diff-pdf-highlighted-text-changes | Generate Diff PDF with Highlighted Text Changes and Verify D... | Document, ComparisonOptions, ComparePages | Demonstrates how to compare two PDF pages, generate a diff PDF with highlighted insertions/deleti... |
| generate-pdf-diff-images-zip | Generate PDF Diff Images and Zip Them | Document, GraphicalPdfComparer, CompareDocumentsToImages | Shows how to compare two PDFs with Aspose.Pdf's GraphicalPdfComparer, export the visual differenc... |
| generate-visual-diff-pdf | Generate Visual Diff PDF Using GraphicalPdfComparer | Document, GraphicalPdfComparer, CompareDocumentsToPdf | Demonstrates how to compare two PDF documents and create a visual diff PDF with Aspose.Pdf's Grap... |
| get-image-differences-between-pdf-pages | Get Image Differences Between PDF Pages | Document, Page, GraphicalPdfComparer | Demonstrates how to compare two PDF documents page‑by‑page using Aspose.Pdf's GraphicalPdfCompare... |
| in-memory-pdf-comparison-diff | In-Memory PDF Comparison with Diff Output | Document, GraphicalPdfComparer, ComparePagesToPdf | Demonstrates loading two PDFs from memory streams, comparing them page‑by‑page using Aspose's Gra... |
| multi-threaded-pdf-comparison | Multi-Threaded PDF Comparison with Aspose.Pdf | Document, SideBySideComparisonOptions, SideBySidePdfComparer | Demonstrates how to compare multiple pairs of PDF files concurrently using Aspose.Pdf's side‑by‑s... |
| preserve-original-metadata-in-diff-pdf | Copy Original PDF Metadata to Diff PDF | Document, CompareDocumentsPageByPage, ComparisonOptions | The example compares two PDF files using Aspose.Pdf.Comparison and then copies all document metad... |
| replace-text-using-diffoperation | Replace Text in PDF Using DiffOperation Comparison | Document, ComparisonOptions, ComparePages | Demonstrates how to compare two PDF pages, reconstruct the original text from the first PDF using... |
| set-custom-image-similarity-tolerance-pdf-comparis... | Set Custom Image Similarity Tolerance for PDF Comparison | Document, GraphicalPdfComparer, Threshold | Demonstrates how to configure a custom tolerance percentage for image differences when comparing ... |
Category Statistics
- Total examples: 28
Category-Specific Tips
Key API Surface
Aspose.Pdf.Comparison.ComparisonOptionsAspose.Pdf.Comparison.ComparisonOptions.EditOperationsOrderAspose.Pdf.Comparison.ComparisonOptions.ExcludeAreas1Aspose.Pdf.Comparison.ComparisonOptions.ExcludeAreas2Aspose.Pdf.Comparison.ComparisonOptions.ExcludeTablesAspose.Pdf.Comparison.ComparisonOptions.ExtractionAreaAspose.Pdf.Comparison.GraphicalPdfComparerAspose.Pdf.Comparison.GraphicalPdfComparer.ColorAspose.Pdf.Comparison.GraphicalPdfComparer.CompareDocumentsToImagesAspose.Pdf.Comparison.GraphicalPdfComparer.CompareDocumentsToPdfAspose.Pdf.Comparison.GraphicalPdfComparer.ComparePagesToImageAspose.Pdf.Comparison.GraphicalPdfComparer.ComparePagesToPdfAspose.Pdf.Comparison.GraphicalPdfComparer.GetDifferenceAspose.Pdf.Comparison.GraphicalPdfComparer.ResolutionAspose.Pdf.Comparison.GraphicalPdfComparer.Threshold
Rules
- Create HtmlDiffOutputGenerator with parameterless constructor: new HtmlDiffOutputGenerator().
- Create HtmlDiffOutputGenerator with: new HtmlDiffOutputGenerator(OutputTextStyle textStyle).
- Configure HtmlDiffOutputGenerator by setting properties: EqualStyle, InsertStyle, DeleteStyle, StrikethroughDeleted.
- Create ComparisonOptions with parameterless constructor: new ComparisonOptions().
- Configure ComparisonOptions by setting properties: ExtractionArea, ExcludeTables, ExcludeAreas1, ExcludeAreas2, EditOperationsOrder.
General Tips
- See parent AGENTS.md for:
- Boundaries -- Always / Ask First / Never rules for all examples
- Common Mistakes -- verified anti-patterns that cause build failures
- Domain Knowledge -- cross-cutting API-specific gotchas
- Testing Guide -- build and run verification steps
- Review code examples in this folder for compare-pdf patterns
<!-- AUTOGENERATED:START -->Updated: 2026-08-20 | Run: 20260820_001147_12d7b3
<!-- AUTOGENERATED:END -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

