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

agentic-net-examples / stamping

AGENTS.md2 starsChanged 4 months agoMITView on GitHub

C# examples for stamping using Aspose.PDF for .NET

The file

Files
AGENTS.md

AGENTS - stamping

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

Scope

  • This folder contains examples for stamping.
  • Files are standalone .cs examples stored directly in this folder.

Required Namespaces

  • using Aspose.Pdf; (50/50 files) ← category-specific
  • using Aspose.Pdf.Text; (11/50 files)
  • using Aspose.Pdf.Annotations; (7/50 files)
  • using Aspose.Pdf.Drawing; (2/50 files)
  • using Aspose.Pdf.Facades; (2/50 files)
  • using System; (50/50 files)
  • using System.IO; (50/50 files)
  • using System.Drawing; (2/50 files)
  • using System.Drawing.Imaging; (1/50 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

FileTitleKey APIsDescription
add-background-image-stamp-to-pdfAdd Background Image Stamp to PDF PagesDocument, ImageStamp, AddStampShows how to place an image stamp behind the existing content of each PDF page by setting the Bac...
add-bold-outlined-text-stampAdd Bold Outlined Text Stamp to PDFDocument, TextStamp, TextStateShows how to create a text stamp with fill‑stroke rendering to produce bold outlined text on a PD...
add-bottom-left-text-stampAdd Bottom‑Left Text Stamp to PDFDocument, TextStamp, HorizontalAlignmentShows how to place a text stamp at the bottom‑left corner of each PDF page with a 10‑point margin...
add-confidential-text-stamp-to-pdfAdd Confidential Text Stamp to PDFDocument, TextStamp, AddStampDemonstrates loading a PDF with Aspose.Pdf, creating a semi‑transparent TextStamp, centering it o...
add-custom-sized-page-stampAdd Custom-Sized Page Stamp to PDFDocument, Page, PdfPageStampDemonstrates creating a PdfPageStamp from an existing page, setting custom width, height, and pos...
add-custom-text-stamp-to-pdf-first-pageAdd Custom Text Stamp to PDF First PageDocument, TextState, FindFontDemonstrates how to place a text stamp with a custom font, size, and blue color on the first page...
add-diagonal-image-watermark-to-pdfAdd Diagonal Image Watermark to PDFDocument, ImageStamp, AddStampDemonstrates how to apply an image stamp rotated 90° as a diagonal watermark on every page of a P...
add-diagonal-text-stamp-watermarkAdd Diagonal Text Stamp Watermark to PDFDocument, TextStamp, FontRepositoryDemonstrates how to add a semi‑transparent, 45‑degree rotated text stamp as a diagonal watermark ...
add-faint-overlay-stamp-to-pdf-pagesAdd Faint Overlay Stamp to PDF PagesDocument, TextStamp, AddStampShows how to apply a semi‑transparent text stamp as a faint overlay on every page of a PDF using ...
add-full-page-image-watermark-to-pdfAdd Full-Page Image Watermark to PDFDocument, Page, ImageStampDemonstrates how to apply an image stamp as a full‑page background watermark to every page of a P...
add-global-text-stamp-to-all-pdf-pagesAdd Global Text Stamp to All PDF PagesDocument, TextStamp, PageShows how to create a TextStamp and apply it to every page of a PDF document using Aspose.Pdf's A...
add-image-stamp-alt-text-pdfaAdd Image Stamp with Alt Text for PDF/A‑1bDocument, ImageStamp, AddStampDemonstrates how to place an image stamp with alternative text on every page of a PDF and then co...
add-image-stamp-annotation-to-pdfAdd Image Stamp Annotation to PDFDocument, Page, RectangleShows how to place an image as a StampAnnotation on a PDF page while preserving existing annotati...
add-image-stamp-flatten-annotationsAdd Image Stamp and Flatten Annotations to Create Read‑Only ...Document, Page, ImageStampDemonstrates how to add an image stamp to every page of a PDF and then flatten all annotations so...
add-image-stamp-floatingbox-page-4Add Image Stamp as Background Using FloatingBox on Page 4Document, Page, FloatingBoxDemonstrates how to place an image stamp as the background of a FloatingBox on the fourth page of...
add-image-stamp-from-memory-stream-to-pdfAdd Image Stamp from Memory Stream to PDFImageStamp, Document, PageDemonstrates how to load an image into a MemoryStream and apply it as an ImageStamp to every page...
add-image-stamp-percentage-positionAdd Image Stamp with Percentage‑Based PositioningDocument, ImageStamp, PageDemonstrates how to place an image stamp on each page of a PDF using offsets expressed as percent...
add-image-stamp-preserve-acroform-fieldsAdd Image Stamp While Preserving AcroForm FieldsDocument, ImageStamp, AddStampDemonstrates how to apply an ImageStamp to every page of a PDF using Aspose.Pdf while keeping exi...
add-image-stamp-preserve-bookmarksAdd Image Stamp While Preserving Bookmarks and OutlineDocument, ImageStamp, AddStampDemonstrates how to load an existing PDF, apply a semi‑transparent image stamp to every page, and...
add-image-stamp-preserve-embedded-filesAdd Image Stamp to PDF While Preserving Embedded FilesDocument, Page, ImageStampDemonstrates how to load a PDF, iterate through its pages, add an image stamp to each page, and s...
add-image-stamp-preserve-javascriptAdd Image Stamp to PDF While Preserving JavaScript ActionsDocument, ImageStamp, AddStampDemonstrates loading a PDF, creating an ImageStamp, applying it to every page, and saving the doc...
add-image-stamp-preserve-page-labelsAdd Image Stamp to PDF While Preserving Page LabelsDocument, ImageStamp, AddStampDemonstrates how to load a PDF, create an ImageStamp, apply it to every page, and save the docume...
add-image-stamp-preserve-xmp-metadataAdd Image Stamp While Preserving XMP MetadataDocument, Page, ImageStampDemonstrates how to load a PDF, retrieve its XMP metadata, apply an image stamp to every page, re...
add-image-stamp-to-encrypted-pdfAdd Image Stamp to Encrypted PDFDocument, Decrypt, ImageStampShows how to open an encrypted PDF with a password, decrypt it, place an image stamp on a page, a...
add-image-stamp-to-pdf-formAdd Image Stamp to PDF Form While Preserving FieldsDocument, Page, ImageStampDemonstrates loading a PDF that contains form fields, adding an image stamp to each page, and sav...
add-image-stamp-to-pdf-pageAdd Image Stamp to PDF Page with Quality and OpacityDocument, ImageStamp, AddStampShows how to place an image stamp on the second page of a PDF, configuring 100% quality and 0.8 o...
add-image-stamp-to-signed-pdfAdd Image Stamp to Signed PDF without Invalidating SignatureDocument, ImageStamp, PageShows how to place a semi‑transparent image stamp on a digitally signed PDF using Aspose.Pdf whil...
add-image-stamp-unicode-alt-textAdd Image Stamp with Unicode Alternative Text to PDFDocument, ImageStamp, AlternativeTextDemonstrates how to place an image stamp on a PDF page and set multilingual Unicode alternative t...
add-image-stamp-with-alt-text-to-pdf-pageAdd Image Stamp with Alt Text to PDF PageDocument, ImageStamp, AddStampDemonstrates how to add an image stamp with alternative text for accessibility to the third page ...
add-low-quality-image-stamp-to-pdfAdd Low-Quality Image Stamp to PDFDocument, ImageStamp, AddStampShows how to load a PDF, create an ImageStamp with reduced quality (10 %) and apply it to every p...
...and 20 more files

Category Statistics

  • Total examples: 50

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 stamping 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.