agentic-net-examples / basic-operations
AGENTS.md2 starsChanged 4 months agoMITView on GitHub
C# examples for basic-operations using Aspose.PDF for .NET
In this repository36 other files it gives its agents.
- accessibility-and-tagged-pdfsAGENTS.md
- aspose-pdf-examplesAGENTS.md
- compare-pdfAGENTS.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
Files
AGENTS - basic-operations
Basic operations in PDF using C# / .NET -- 56 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 basic-operations category. This folder contains standalone C# examples for basic-operations operations. See the root agents.md for repository-wide conventions and boundaries.
Scope
- This folder contains examples for basic-operations.
- Files are standalone
.csexamples stored directly in this folder.
Required Namespaces
using Aspose.Pdf;(56/56 files) ← category-specificusing Aspose.Pdf.Text;(2/56 files)using Aspose.Pdf.Facades;(1/56 files)using Aspose.Pdf.Optimization;(1/56 files)using System;(56/56 files)using System.IO;(55/56 files)using System.Collections.Generic;(3/56 files)using System.Text;(2/56 files)using System.Net.Http;(1/56 files)using System.Security.Cryptography;(1/56 files)using System.Text.Json;(1/56 files)using System.Threading.Tasks;(1/56 files)
Common Code Pattern
Most files follow this pattern:
using (Document doc = new Document("input.pdf"))
{
// ... operations ...
doc.Save("output.pdf");
}Files in this folder
| File | Title | Key APIs | Description |
| add-blank-page-to-pdf | Add Blank Page to PDF | Document, Pages, Add | Shows how to load an existing PDF with Aspose.Pdf, insert an empty page at the end, and save the ... |
| add-custom-xmp-metadata-to-pdf | Add Custom XMP Metadata to PDF | Document, SetXmpMetadata, Save | Shows how to load a PDF, create a custom XMP metadata packet, attach it to the document using Asp... |
| batch-convert-pdf-to-pdfa-with-report | Batch Convert PDFs to PDF/A‑1b with Compression and Report | Document, PdfFormatConversionOptions, PdfFormat | Loads each PDF from a folder, converts it to PDF/A‑1b using high compression, saves the converted... |
| batch-convert-pdfs-to-pdfa-1b | Batch Convert PDFs to PDF/A‑1b | Document, Convert, PdfFormat | Shows how to iterate through a folder of PDF files, convert each to PDF/A‑1b compliance with Aspo... |
| batch-convert-pdfs-to-pdfa-with-csv-report | Batch Convert PDFs to PDF/A-1b with CSV Report | Document, PdfFormat, ConvertErrorAction | Processes all PDF files in a folder, converts each to PDF/A‑1b using Aspose.Pdf, writes individua... |
| batch-decrypt-encrypted-pdfs | Batch Decrypt Encrypted PDFs with Owner Password | Document, Decrypt, Save | Demonstrates how to iterate through a folder of encrypted PDF files, open each using a shared own... |
| batch-encrypt-pdfs-in-directory | Batch Encrypt PDFs in a Directory | Document, Encrypt, Save | Demonstrates how to encrypt all PDF files in a folder using a common user and owner password, app... |
| batch-encrypt-pdfs-with-deterministic-passwords | Batch Encrypt PDFs with Deterministic Passwords | Document, Encrypt, Permissions | Demonstrates how to encrypt multiple PDF files in a folder using Aspose.Pdf, generating a unique ... |
| batch-encrypt-pdfs | Batch Encrypt PDFs with User Passwords | Document, Encrypt, Save | Demonstrates reading a JSON configuration, encrypting multiple PDF files with individual user pas... |
| batch-split-pdf-by-page-ranges | Batch Split PDF into Sections by Page Ranges | Document, Pages, Save | Shows how to read page range definitions from a configuration file and split a PDF into separate ... |
| compress-pdf-default-settings | Compress PDF with Default Settings using Aspose.Pdf | Document, Save | Demonstrates loading a PDF, saving it with Aspose.Pdf's default compression, and comparing the fi... |
| compress-pdf-high-optimization | Compress PDF with High Optimization and Compare File Size | Document, OptimizationOptions, All | Loads a PDF, applies high‑level compression using Aspose.Pdf optimization options, saves the resu... |
| convert-pdf-to-pdfa-1b | Convert PDF to PDF/A-1b preserving structure | Document, PdfFormatConversionOptions, PdfFormat | Demonstrates loading a PDF with Aspose.Pdf, configuring PDF/A‑1b conversion options, performing t... |
| convert-pdf-to-pdfa-1b__v2 | Convert PDF to PDF/A‑1b Compliance | Document, Convert, PdfFormat | Loads a PDF file, converts it to PDF/A‑1b compliance while logging conversion errors, and saves t... |
| convert-pdf-to-pdfa1b | Convert PDF to PDF/A-1b with Metadata Preservation | Document, Convert, PdfFormat | Demonstrates loading a PDF, converting it to PDF/A-1b compliance while preserving metadata, and s... |
| convert-pdf-to-pdfx3-cmyk | Convert PDF to PDF/X-3 with CMYK Color Space | Document, OutputIntent, Convert | Shows how to convert a PDF to PDF/X-3 compliance while forcing all colors to CMYK using an ICC pr... |
| convert-pdf-to-pdfx3-preserve-icc | Convert PDF to PDF/X‑3 Preserving ICC Profile | Document, PdfFormatConversionOptions, PdfFormat | Demonstrates loading a PDF with Aspose.Pdf, converting it to PDF/X‑3 format while keeping the exi... |
| convert-pdf-to-pdfx3 | Convert PDF to PDF/X-3 while Preserving Color Profiles | Document, Convert, PdfFormat | Shows how to load a PDF, convert it to PDF/X-3 compliance (which retains embedded ICC color profi... |
| create-pdfa1b-with-text-paragraph | Create PDF/A-1b Document with Text Paragraph | Document, Page, TextParagraph | Creates a new PDF, adds a text paragraph to the first page, converts the document to PDF/A‑1b com... |
| create-pdfx3-document-three-pages | Create PDF/X‑3 Document with Three Pages | Document, Add, Convert | Shows how to create a new PDF, add three blank pages, convert it to PDF/X‑3 compliance, and save ... |
| decrypt-encrypted-pdf | Decrypt Encrypted PDF with User Password | Document, Decrypt, Save | Demonstrates opening a password‑protected PDF, decrypting it, and saving an unprotected copy usin... |
| disable-font-embedding-when-saving-pdf | Disable Font Embedding When Saving PDF | Document, PdfSaveOptions, Save | The example opens an existing PDF, sets a default font in PdfSaveOptions to substitute missing fo... |
| download-pdf-from-url-and-save | Download PDF from URL and Save Locally with Aspose.Pdf | Document, Save, Stream) | Demonstrates downloading a PDF via HttpClient, loading it into an Aspose.Pdf Document from a stre... |
| encrypt-pdf-aes128-verify-print-permissions | Encrypt PDF with AES‑128 and Verify Print Permissions | Document, Permissions, CryptoAlgorithm | The example loads a PDF, applies AES‑128 encryption with user and owner passwords, sets printing ... |
| encrypt-pdf-aes256-no-print | Encrypt PDF with AES‑256 and No Printing Permission | Document, Encrypt, CryptoAlgorithm | Demonstrates how to apply AES‑256 encryption to a PDF using Aspose.Pdf, set no permissions (disab... |
| encrypt-pdf-allow-form-filling | Encrypt PDF Allowing Only Form Filling | Document, Permissions, Encrypt | The example loads a PDF, encrypts it with AES‑256, and sets permissions so that only form filling... |
| encrypt-pdf-form-fill-permission | Encrypt PDF and Allow Only Form Filling | Document, Permissions, CryptoAlgorithm | Demonstrates how to encrypt a PDF with user and owner passwords, restrict permissions to form fil... |
| encrypt-pdf-form-filling-permission | Encrypt PDF with Form Filling Permission Only | Document, Permissions, CryptoAlgorithm | Demonstrates how to encrypt a PDF using Aspose.Pdf, allowing only form filling and disabling cont... |
| encrypt-pdf-owner-password-only | Encrypt PDF with Owner Password Only | Document, Permissions, Encrypt | Shows how to encrypt a PDF using Aspose.Pdf by applying only an owner password, giving the owner ... |
| encrypt-pdf-rc4-128-verify-size | Encrypt PDF with 128‑bit RC4 and Verify Size Increase | Document, Encrypt, Permissions | Demonstrates how to encrypt a PDF using 128‑bit RC4 encryption with Aspose.Pdf and compare the or... |
| ... | and 26 more files |
Category Statistics
- Total examples: 56
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 basic-operations 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.

