agentleFS
aspose-pdfaspose-pdf/agentic-net-examples/facades-edit-document/AGENTS.md

agentic-net-examples / facades-edit-document

AGENTS.md2 starsChanged 4 months agoMITView on GitHub

C# examples for facades-edit-document using Aspose.PDF for .NET

The file

We split this AGENTS.md into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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 DictionaryEditor with: new DictionaryEditor(Page page).

    line 121
  2. Distinctive:

    Create DictionaryEditor with: new DictionaryEditor(Document document).

    line 122
  3. Distinctive:

    Create DictionaryEditor with: new DictionaryEditor(Resources resources).

    line 123
  4. Distinctive:

    Use DictionaryEditor.Add() to insert items into the collection.

    line 124
  5. Distinctive:

    Create CosPdfDictionary with: new CosPdfDictionary(Resources resources).

    line 125

≈ “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 - facades-edit-document

Facades edit document in PDF using C# / .NET -- 214 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 facades-edit-document category. This folder contains standalone C# examples for facades-edit-document operations. See the root agents.md for repository-wide conventions and boundaries.

Scope

  • This folder contains examples for facades-edit-document.
  • Files are standalone .cs examples stored directly in this folder.

Required Namespaces

  • using Aspose.Pdf.Facades; (192/214 files) ← category-specific
  • using Aspose.Pdf; (137/214 files) ← category-specific
  • using Aspose.Pdf.Annotations; (26/214 files)
  • using Aspose.Pdf.Text; (20/214 files)
  • using Aspose.Pdf.Devices; (7/214 files)
  • using Aspose.Pdf.Printing; (4/214 files)
  • using Aspose.Pdf.Drawing; (2/214 files)
  • using Aspose.Pdf.Forms; (2/214 files)
  • using System; (214/214 files)
  • using System.IO; (201/214 files)
  • using System.Drawing; (39/214 files)
  • using System.Collections.Generic; (10/214 files)
  • using System.Text.Json; (6/214 files)
  • using System.Drawing.Imaging; (4/214 files)
  • using System.Threading.Tasks; (4/214 files)
  • using System.Net.Http; (3/214 files)
  • using NUnit.Framework; (2/214 files)
  • using System.Security.Cryptography; (2/214 files)
  • using System.Xml.Linq; (2/214 files)
  • using System.Collections; (1/214 files)
  • using System.Drawing.Printing; (1/214 files)
  • using System.Linq; (1/214 files)
  • using System.Threading; (1/214 files)
  • using System.Xml; (1/214 files)

Common Code Pattern

Most files in this category use PdfContentEditor from Aspose.Pdf.Facades:

PdfContentEditor tool = new PdfContentEditor();
tool.BindPdf("input.pdf");
// ... PdfContentEditor operations ...
tool.Save("output.pdf");

Files in this folder

FileTitleKey APIsDescription
add-an-attachment-with-custom-mime-type-applicatio...Add An Attachment With Custom Mime Type Application Pdf And ...PdfContentEditorAdd An Attachment With Custom Mime Type Application Pdf And Description Invoice Document
add-annotation-and-merge-pdfsAdd Annotation to PDF and Merge with Another PDFDocument, Page, TextAnnotationThe example loads a PDF, adds a text annotation to its first page, saves it, and then concatenate...
add-attachment-and-encrypt-pdfAdd Attachment and Encrypt PDF with PasswordPdfContentEditor, AddDocumentAttachment, ChangeViewerPreferenceDemonstrates adding a document attachment, setting viewer preferences, and then encrypting the PD...
add-attachment-and-list-namesAdd Attachment to PDF and List Attachment NamesDocument, PdfContentEditor, PdfExtractorDemonstrates how to embed a PDF file as an attachment using PdfContentEditor and then extract and...
add-attachment-and-retrieve-nameAdd Attachment and Retrieve Its Name from PDFPdfContentEditor, AddDocumentAttachment, SaveDemonstrates how to embed a file as a PDF attachment using PdfContentEditor and then extract the ...
add-attachment-and-set-viewer-preferenceAdd Attachment and Set Viewer Preference in PDFPdfContentEditor, BindPdf, AddDocumentAttachmentShows how to embed a file as a document attachment and configure the PDF viewer to open the attac...
add-attachment-and-store-checksum-metadataAdd PDF Attachment and Store Checksum in MetadataDocument, TextFragment, PdfContentEditorDemonstrates attaching a PDF file to another PDF using Aspose.Pdf.Facades, computing its MD5 chec...
add-attachment-preserve-existingAdd Attachment to PDF Without Deleting Existing AttachmentsPdfContentEditor, BindPdf, AddDocumentAttachmentDemonstrates how to add a new document attachment to an existing PDF while keeping any previously...
add-attachment-set-modification-dateAdd Attachment and Set Modification Date in PDFPdfContentEditor, AddDocumentAttachment, BindPdfDemonstrates how to attach a file to a PDF and update the document's modification date to the cur...
add-attachment-to-multiple-pdfsAdd Attachment to Multiple PDFsPdfContentEditor, BindPdf, AddDocumentAttachmentShows how to batch‑process a list of PDF files and add the same document attachment to each using...
add-attachment-verify-extractionAdd Attachment to PDF and Verify ExtractionPdfContentEditor, AddDocumentAttachment, SaveDemonstrates how to attach a file to a PDF using PdfContentEditor, then extract the attachment wi...
add-batch-text-annotations-to-pdfAdd Batch Text Annotations to PDFDocument, PdfAnnotationEditor, TextAnnotationShows how to add multiple text annotations to a PDF in a single batch by looping over annotation ...
add-bold-red-centered-text-stamp-page-5Add Bold Red Centered Text Stamp to Page 5Document, TextStamp, FontRepositoryDemonstrates how to place a bold, red, centered text stamp on the fifth page of a PDF using Aspos...
add-bookmark-to-pdf-pageAdd Bookmark to PDF PagePdfBookmarkEditor, BindPdf, CreateBookmarkOfPageShows how to create a bookmark titled "Project Overview" that links to page five of a PDF using A...
add-confidential-text-stampAdd Confidential Text Stamp to PDFFormattedText, BindLogo, IsBackgroundDemonstrates creating a red "Confidential" text stamp with semi‑transparent background and applyi...
add-corporate-branding-xmp-metadataAdd Corporate Branding XMP Metadata to PDFPdfXmpMetadata, BindPdf, AddDemonstrates how to bind a PDF, add custom XMP metadata such as a logo URL and brand color, and s...
add-custom-xmp-metadata-projectidAdd Custom XMP Metadata and Document Property to PDFPdfXmpMetadata, BindPdf, AddDemonstrates how to add a custom XMP metadata field (ProjectID) to a PDF and synchronize it with ...
add-dashed-line-annotation-to-pdfAdd Dashed Line Annotation to PDF DiagramPdfContentEditor, BindPdf, CreateLineDemonstrates how to add a custom dashed line annotation to a PDF page using Aspose.Pdf.Facades.Pd...
add-dashed-rectangle-annotation-with-opacityAdd Dashed Rectangle Annotation with Opacity to PDF PagePdfContentEditor, BindPdf, CreateSquareCircleDemonstrates how to add a rectangle (square) annotation on page 6 of a PDF, apply a dashed border...
add-document-attachment-with-descriptionAdd Document Attachment with Description to PDFPdfContentEditor, BindPdf, AddDocumentAttachmentShows how to attach an external PDF file to an existing PDF and assign a descriptive label using ...
add-document-attachment-with-error-handlingAdd Document Attachment to PDF with Error HandlingPdfContentEditor, BindPdf, AddDocumentAttachmentDemonstrates how to attach an external file to a PDF using Aspose.Pdf.Facades.PdfContentEditor wh...
add-embedded-file-attachment-to-pdfAdd Embedded File Attachment to PDFPdfContentEditor, BindPdf, AddDocumentAttachmentShows how to embed an external file as a hidden attachment in an existing PDF using Aspose.Pdf's ...
add-encrypted-attachment-aes256Add Encrypted Attachment to PDF with AES‑256Document, PdfContentEditor, PdfFileSecurityDemonstrates adding a file attachment with a custom description to a PDF and then encrypting the ...
add-external-url-bookmark-to-pdfAdd External URL Bookmark to PDFPdfContentEditor, BindPdf, CreateBookmarksActionShows how to use Aspose.Pdf.Facades.PdfContentEditor to create a bookmark that opens an external ...
add-file-attachment-annotationAdd File Attachment Annotation to PDFPdfContentEditor, BindPdf, CreateFileAttachmentDemonstrates how to attach a file to a PDF page as a clickable annotation using Aspose.Pdf.Facade...
add-file-attachment-data-relationshipAdd File Attachment with Data Relationship to PDFPdfContentEditor, BindPdf, AddDocumentAttachmentShows how to attach a file to an existing PDF using PdfContentEditor and set the attachment's AFR...
add-file-attachment-to-encrypted-pdfAdd File Attachment to Encrypted PDFDocument, PdfContentEditor, Document(string, string)Shows how to open a password‑protected PDF, attach a file to it, and save the modified document.
add-file-attachment-to-pdfAdd File Attachment to PDFPdfContentEditor, BindPdf, AddDocumentAttachmentDemonstrates how to attach an external file (Terms.pdf) to an existing PDF document using Aspose....
add-file-attachment-to-pdf__v2Add File Attachment to PDF using PdfContentEditorPdfContentEditor, BindPdf, AddDocumentAttachmentShows how to attach a local file to an existing PDF document and save the updated PDF using Aspos...
add-file-attachment-with-creation-dateAdd File Attachment with Creation Date to PDFPdfContentEditor, BindPdf, CreateFileAttachmentShows how to attach a file to a PDF page, give it a description, and set the attachment's creatio...
...and 184 more files

Category Statistics

  • Total examples: 214

Category-Specific Tips

Key API Surface

  • Aspose.Pdf.DataEditor.CosPdfBoolean
  • Aspose.Pdf.DataEditor.CosPdfBoolean.Equals
  • Aspose.Pdf.DataEditor.CosPdfBoolean.GetHashCode
  • Aspose.Pdf.DataEditor.CosPdfBoolean.ToCosPdfBoolean
  • Aspose.Pdf.DataEditor.CosPdfBoolean.ToString
  • Aspose.Pdf.DataEditor.CosPdfBoolean.Value
  • Aspose.Pdf.DataEditor.CosPdfDictionary
  • Aspose.Pdf.DataEditor.CosPdfDictionary.Add
  • Aspose.Pdf.DataEditor.CosPdfDictionary.AllKeys
  • Aspose.Pdf.DataEditor.CosPdfDictionary.Clear
  • Aspose.Pdf.DataEditor.CosPdfDictionary.Contains
  • Aspose.Pdf.DataEditor.CosPdfDictionary.ContainsKey
  • Aspose.Pdf.DataEditor.CosPdfDictionary.CopyTo
  • Aspose.Pdf.DataEditor.CosPdfDictionary.Count
  • Aspose.Pdf.DataEditor.CosPdfDictionary.CreateEmptyDictionary

Rules

  • Create DictionaryEditor with: new DictionaryEditor(Page page).
  • Create DictionaryEditor with: new DictionaryEditor(Document document).
  • Create DictionaryEditor with: new DictionaryEditor(Resources resources).
  • Use DictionaryEditor.Add() to insert items into the collection.
  • Create CosPdfDictionary with: new CosPdfDictionary(Resources resources).

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 facades-edit-document 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.