agentleFS
aspose-pdfaspose-pdf/agentic-net-examples/compare-pdf/AGENTS.md

agentic-net-examples / compare-pdf

AGENTS.md2 starsChanged 4 months agoMITView on GitHub

C# examples for compare-pdf using Aspose.PDF for .NET

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
  1. Distinctive:

    Create HtmlDiffOutputGenerator with parameterless constructor: new HtmlDiffOutputGenerator().

    line 110
  2. Distinctive:

    Create HtmlDiffOutputGenerator with: new HtmlDiffOutputGenerator(OutputTextStyle textStyle).

    line 111
  3. Distinctive:

    Create ComparisonOptions with parameterless constructor: new ComparisonOptions().

    line 113

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS - compare-pdf

Compare PDF in PDF using C# / .NET -- 28 verified, compile-tested examples for Aspose.PDF for .NET 26.8.0. Each .cs file 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 .cs examples stored directly in this folder.

Required Namespaces

  • using Aspose.Pdf; (28/28 files) ← category-specific
  • using Aspose.Pdf.Comparison; (27/28 files) ← category-specific
  • using 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

FileTitleKey APIsDescription
batch-pdf-comparison-parallelBatch PDF Comparison with Parallel ProcessingDocument, SideBySidePdfComparer, CompareDemonstrates how to compare a large set of PDFs against a reference file using Aspose.Pdf's compa...
compare-encrypted-pdfs-side-by-sideCompare Encrypted PDFs Side‑by‑Side with PasswordsDocument, SideBySideComparisonOptions, SideBySidePdfComparerDemonstrates loading two password‑protected PDF files and performing a side‑by‑side visual compar...
compare-pdf-documents-page-by-page-diffCompare PDF Documents Page by Page and Generate Diff PDFDocument, ComparisonOptions, TextPdfComparerDemonstrates how to compare two PDF files page by page using Aspose.Pdf's default ComparisonOptio...
compare-pdf-text-ignoring-compressionCompare PDFs Textually Ignoring Compression DifferencesDocument, ComparisonOptions, CompareFlatDocumentsDemonstrates how to compare two PDF files that have identical content but different compression s...
compare-pdfs-detect-font-differencesCompare PDFs and Detect Font DifferencesDocument, ComparisonOptions, CompareFlatDocumentsDemonstrates how to compare two PDF files using Aspose.Pdf and report font changes as separate di...
compare-pdfs-different-page-sizesCompare PDFs with Different Page SizesDocument, Page, PageInfoShows how to align the page dimensions of two PDFs and use GraphicalPdfComparer to compare them, ...
compare-pdfs-generate-json-diff-reportCompare PDFs and Generate JSON Diff ReportDocument, TextAbsorber, VisitThe example loads two PDF files, extracts their text page by page using Aspose.Pdf, identifies ad...
compare-pdfs-ignore-signature-fieldsCompare PDFs While Ignoring Signature FieldsDocument, Page, AnnotationLoads two signed PDFs, extracts the rectangles of all signature fields, excludes those areas from...
compare-pdfs-log-differencesCompare PDFs and Log Differences by PageDocument, ComparisonOptions, CompareDocumentsPageByPageShows how to compare two PDF documents page‑by‑page with Aspose.Pdf and write an audit log that r...
compare-pdfs-unicode-text-differencesCompare PDFs with Unicode Text and Detect DifferencesDocument, Page, TextFragmentCreates English and Russian PDFs, then uses Aspose.Pdf's comparison API to detect Unicode text di...
compare-pdfs-with-form-fieldsCompare PDFs Including Form Field ValuesDocument, ComparisonOptions, CompareDocumentsPageByPageDemonstrates how to compare two PDF documents, including form field values, and generate both a J...
compare-selected-pdf-pages-side-by-sideCompare Selected PDF Pages Side‑by‑SideDocument, ComparisonOptions, SideBySideComparisonOptionsDemonstrates how to compare specific pages of two PDFs using Aspose.Pdf's side‑by‑side visual com...
compare-specific-page-range-pdfCompare Specific Page Range of Two PDFsDocument, ComparisonOptions, CompareDocumentsPageByPageLoads two PDF documents, defines a page range, compares the selected pages using Aspose.Pdf's com...
compare-two-pdfs-aspdf-comparisonCompare Two PDFs Using Aspose.Pdf.ComparisonDocument, ComparisonOptions, TextPdfComparerDemonstrates how to compare two PDF documents with Aspose.Pdf, generating a result PDF that highl...
compare-two-pdfs-visual-diffCompare Two PDFs and Generate a Visual DiffDocument, ComparisonOptions, CompareFlatDocumentsDemonstrates how to compare two PDF documents using Aspose.Pdf, generate a list of differences, a...
exclude-annotations-from-pdf-comparisonExclude Annotations from PDF ComparisonDocument, Page, AnnotationDemonstrates collecting annotation bounding rectangles from two PDFs and configuring SideBySideCo...
exclude-areas-from-pdf-comparisonExclude Areas from PDF ComparisonDocument, Rectangle, SideBySideComparisonOptionsDemonstrates how to define rectangular regions to exclude from each PDF and perform a side‑by‑sid...
exclude-footer-areas-in-pdf-comparisonExclude Footer Areas in PDF ComparisonDocument, Page, RectangleDemonstrates how to define rectangular exclude areas to omit footers when performing a side‑by‑si...
generate-diff-pdf-by-comparing-two-pdfsGenerate a Diff PDF by Comparing Two PDFsDocument, GraphicalPdfComparer, CompareDocumentsToPdfDemonstrates how to use Aspose.Pdf to compare two PDF documents and create a highlighted diff PDF...
generate-diff-pdf-highlighted-text-changesGenerate Diff PDF with Highlighted Text Changes and Verify D...Document, ComparisonOptions, ComparePagesDemonstrates how to compare two PDF pages, generate a diff PDF with highlighted insertions/deleti...
generate-pdf-diff-images-zipGenerate PDF Diff Images and Zip ThemDocument, GraphicalPdfComparer, CompareDocumentsToImagesShows how to compare two PDFs with Aspose.Pdf's GraphicalPdfComparer, export the visual differenc...
generate-visual-diff-pdfGenerate Visual Diff PDF Using GraphicalPdfComparerDocument, GraphicalPdfComparer, CompareDocumentsToPdfDemonstrates how to compare two PDF documents and create a visual diff PDF with Aspose.Pdf's Grap...
get-image-differences-between-pdf-pagesGet Image Differences Between PDF PagesDocument, Page, GraphicalPdfComparerDemonstrates how to compare two PDF documents page‑by‑page using Aspose.Pdf's GraphicalPdfCompare...
in-memory-pdf-comparison-diffIn-Memory PDF Comparison with Diff OutputDocument, GraphicalPdfComparer, ComparePagesToPdfDemonstrates loading two PDFs from memory streams, comparing them page‑by‑page using Aspose's Gra...
multi-threaded-pdf-comparisonMulti-Threaded PDF Comparison with Aspose.PdfDocument, SideBySideComparisonOptions, SideBySidePdfComparerDemonstrates how to compare multiple pairs of PDF files concurrently using Aspose.Pdf's side‑by‑s...
preserve-original-metadata-in-diff-pdfCopy Original PDF Metadata to Diff PDFDocument, CompareDocumentsPageByPage, ComparisonOptionsThe example compares two PDF files using Aspose.Pdf.Comparison and then copies all document metad...
replace-text-using-diffoperationReplace Text in PDF Using DiffOperation ComparisonDocument, ComparisonOptions, ComparePagesDemonstrates 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 ComparisonDocument, GraphicalPdfComparer, ThresholdDemonstrates 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.ComparisonOptions
  • Aspose.Pdf.Comparison.ComparisonOptions.EditOperationsOrder
  • Aspose.Pdf.Comparison.ComparisonOptions.ExcludeAreas1
  • Aspose.Pdf.Comparison.ComparisonOptions.ExcludeAreas2
  • Aspose.Pdf.Comparison.ComparisonOptions.ExcludeTables
  • Aspose.Pdf.Comparison.ComparisonOptions.ExtractionArea
  • Aspose.Pdf.Comparison.GraphicalPdfComparer
  • Aspose.Pdf.Comparison.GraphicalPdfComparer.Color
  • Aspose.Pdf.Comparison.GraphicalPdfComparer.CompareDocumentsToImages
  • Aspose.Pdf.Comparison.GraphicalPdfComparer.CompareDocumentsToPdf
  • Aspose.Pdf.Comparison.GraphicalPdfComparer.ComparePagesToImage
  • Aspose.Pdf.Comparison.GraphicalPdfComparer.ComparePagesToPdf
  • Aspose.Pdf.Comparison.GraphicalPdfComparer.GetDifference
  • Aspose.Pdf.Comparison.GraphicalPdfComparer.Resolution
  • Aspose.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 -->

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.