Skip to content

aspose-pdf/agentic-net-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

239 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aspose.PDF for .NET Examples

AI-friendly repository containing validated C# examples for Aspose.PDF for .NET API.

Overview

This repository provides working code examples demonstrating Aspose.PDF for .NET capabilities. All examples are automatically generated, compiled, and validated using the Aspose.PDF Examples Generator.

Metric Value
Total examples 2708
Categories 34
Target framework net10.0
Aspose.PDF version 26.3.0
Last updated 2026-04-10

Repository Structure

Examples are organized by feature category:

  • accessibility-and-tagged-pdfs/ - 45 example(s)
  • basic-operations/ - 57 example(s)
  • compare-pdf/ - 28 example(s)
  • conversion/ - 102 example(s)
  • document/ - 122 example(s)
  • facades-acroforms/ - 41 example(s)
  • facades-annotations/ - 107 example(s)
  • facades-bookmarks/ - 35 example(s)
  • facades-convert-documents/ - 40 example(s)
  • facades-documents/ - 101 example(s)
  • facades-edit-document/ - 214 example(s)
  • facades-extract-images-and-text/ - 83 example(s)
  • facades-fill-forms/ - 35 example(s)
  • facades-forms/ - 88 example(s)
  • facades-metadata/ - 40 example(s)
  • facades-pages/ - 117 example(s)
  • facades-secure-documents/ - 40 example(s)
  • facades-sign-documents/ - 35 example(s)
  • facades-stamps/ - 50 example(s)
  • facades-texts-and-images/ - 29 example(s)
  • facades-xmp-metadata/ - 45 example(s)
  • graphs-zugferd-operators/ - 84 example(s)
  • pages/ - 99 example(s)
  • parse-pdf/ - 65 example(s)
  • securing-and-signing-pdf/ - 87 example(s)
  • stamping/ - 50 example(s)
  • working-with-annotations/ - 163 example(s)
  • working-with-attachments/ - 50 example(s)
  • working-with-forms/ - 240 example(s)
  • working-with-graphs/ - 85 example(s)
  • working-with-images/ - 72 example(s)
  • working-with-tables/ - 109 example(s)
  • working-with-text/ - 75 example(s)
  • working-with-xml/ - 75 example(s)

Each category contains standalone .cs files that can be compiled and run independently.

Getting Started

Prerequisites

  • .NET SDK (net10.0 or compatible version)
  • Aspose.PDF for .NET NuGet package (26.3.0)
  • Valid Aspose license (for production use)

Running Examples

Each example is a self-contained C# file. To run an example:

cd <CategoryFolder>
dotnet new console -o ExampleProject
cd ExampleProject
dotnet add package Aspose.PDF --version 26.3.0
# Copy the example .cs file as Program.cs
dotnet run

Code Patterns

Loading a PDF

using (Document pdfDoc = new Document("input.pdf"))
{
    // Work with document
}

Error Handling

if (!File.Exists(inputPath))
{
    Console.Error.WriteLine($"Error: File not found - {inputPath}");
    return;
}

try
{
    // Operations
}
catch (Exception ex)
{
    Console.Error.WriteLine($"Error: {ex.Message}");
}

Important Notes

  • One-based indexing: Aspose.PDF uses 1-based page indexing (Pages[1] = first page)
  • Deterministic cleanup: All IDisposable objects wrapped in using blocks
  • Console output: Success/error messages written to Console.WriteLine/Console.Error
  • Fully qualified types: Use Aspose.Pdf.Drawing.Path (not bare Path) to avoid ambiguity with System.IO.Path

Documentation

  • Each category folder contains an agents.md with category-specific guidance
  • Each category folder contains an index.json with per-example metadata
  • Root agents.md provides cumulative guidance across all categories
  • Root index.json provides a machine-readable manifest of all examples

Related Resources

Official Documentation

Downloads & Packages

Community & Support

Licensing & Purchase

License

All examples use Aspose.PDF for .NET and require a valid license for production use. See licensing options.


This repository is maintained by automated code generation. For AI-friendly guidance, see agents.md. Last updated: 2026-04-10

About

AI verified C# code examples for Aspose.PDF for .NET. Each example compiles, runs, and includes an agents.md guide for AI coding agents..

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages