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

agentic-net-examples / facades-stamps

AGENTS.md2 starsChanged 4 months agoMITView on GitHub

C# examples for facades-stamps using Aspose.PDF for .NET

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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 a PdfFileStamp instance, bind it to {input_pdf} with BindPdf, then call AddFooter({image_stream}, {int}) to place the image footer …

    line 105
  2. Distinctive:

    Call AddHeader({image_stream}, {int}) on the bound PdfFileStamp to place an image header on each page, where the integer specifies the …

    line 108

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

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

Scope

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

Required Namespaces

  • using Aspose.Pdf.Facades; (37/48 files) ← category-specific
  • using Aspose.Pdf; (35/48 files) ← category-specific
  • using Aspose.Pdf.Text; (14/48 files)
  • using Aspose.Pdf.Annotations; (2/48 files)
  • using Aspose.Pdf.Drawing; (1/48 files)
  • using Aspose.Pdf.Forms; (1/48 files)
  • using System; (48/48 files)
  • using System.IO; (47/48 files)
  • using System.Drawing; (11/48 files)
  • using System.Text; (1/48 files)

Common Code Pattern

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

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

Files in this folder

FileTitleKey APIsDescription
add-background-watermark-to-specific-pdf-pagesAdd Background Watermark to Specific PDF PagesPdfFileStamp, Stamp, FormattedTextDemonstrates how to apply a light‑gray background watermark to pages 2‑5 of a PDF using Aspose.Pd...
add-confidential-text-and-logo-stampAdd Confidential Text and Logo Stamp to PDFPdfFileStamp, Stamp, FormattedTextDemonstrates using Aspose.Pdf.Facades to place a combined formatted text stamp and a logo image o...
add-creation-date-stampAdd Creation Date Stamp to PDFDocument, DocumentInfo, TextStampShows how to read a PDF's creation date and place it as a text stamp in the top‑left corner of ev...
add-custom-border-stamp-to-pdfAdd Custom Border Stamp Annotation to PDFDocument, StampAnnotation, BorderDemonstrates how to load a PDF, create a rubber‑stamp annotation with a custom red border and thi...
add-dynamic-text-stamp-to-pdfAdd Dynamic Text Stamp to PDFDocument, Page, TextStampDemonstrates creating a TextStamp with interpolated author and date values, applying it to each p...
add-file-name-header-stamp-to-pdfAdd File Name Header Stamp to PDFDocument, TextStamp, FindFontDemonstrates creating a TextStamp that shows the PDF's file name in the header of each page and a...
add-footer-date-stamp-to-last-pdf-pageAdd Footer Date Stamp to Last PDF PageDocument, Page, TextStampDemonstrates how to insert a footer stamp containing the current date (MM-dd-yyyy) on the last pa...
add-footer-stamp-10-points-above-bottomAdd Footer Stamp 10 Points Above Bottom EdgePdfFileStamp, BindPdf, AddFooterDemonstrates how to use PdfFileStamp to add a footer stamp positioned exactly 10 points above the...
add-footer-with-page-countAdd Footer with Page Count to PDFPdfFileStamp, BindPdf, AddPageNumberShows how to use Aspose.Pdf.Facades.PdfFileStamp to add a footer that displays the current page n...
add-header-stamp-to-pdf-pagesAdd Header Stamp to All PDF PagesDocument, Page, TextStampShows how to load a PDF with Aspose.Pdf, iterate through its Pages collection, and add a centered...
add-image-stamp-to-pdfs-preserve-filenamesAdd Image Stamp to PDFs and Preserve FilenamesPdfFileStamp, Stamp, BindPdfIterates over PDF files in a source folder, applies an image stamp to each page using the PdfFile...
add-lower-roman-page-numbers-odd-pagesAdd Lower‑Roman Page Numbers to Odd PagesDocument, PageNumberStamp, NumberingStyleDemonstrates how to add page numbers in lower‑case Roman numerals to only the odd pages of a PDF ...
add-multi-line-colored-header-stampAdd Multi-Line Colored Header Stamp to PDFBindPdf, AddStamp, SaveDemonstrates how to apply a multi‑line header stamp with different font colors to each line using...
add-multi-line-text-watermark-facadeAdd Multi-Line Text Watermark to PDF using FacadesPdfFileStamp, FormattedText, AddNewLineTextShows how to create a multi-line text watermark with Aspose.Pdf.Facades by using FormattedText, a...
add-multi-line-text-watermarkAdd Multi‑Line Text Watermark with Varying Font SizesDocument, Page, FindFontDemonstrates how to apply a multi‑line watermark to each page of a PDF, using different font size...
add-multi-line-watermark-custom-fontAdd Multi‑Line Watermark with Custom Font to PDFDocument, FormattedText, BindLogoDemonstrates loading a PDF from a memory stream and applying a multi‑line, custom‑styled watermar...
add-page-number-stamp-leading-zerosAdd Page Number Stamp with Leading Zeros to PDFDocument, PdfFileStamp, NumberingStyleShows how to use Aspose.Pdf to stamp Arabic numeral page numbers with leading zeros on every page...
add-page-number-stamp-to-pdfAdd Page Number Stamp to PDFPdfFileStamp, AddPageNumber, StartingNumberShows how to use Aspose.Pdf.Facades.PdfFileStamp to add a dynamic page‑number stamp (using the "#...
add-qr-code-stamp-from-pdf-metadataAdd QR Code Stamp from PDF MetadataDocument, Stamp, PdfFileStampDemonstrates how to generate a QR code from a PDF's metadata and apply it as a stamp on the docum...
add-repeating-background-watermark-imageAdd Repeating Background Watermark Image to PDF PagesPdfFileStamp, Stamp, BindImageShows how to use PdfFileStamp with a single Stamp instance to place a semi‑transparent background...
add-right-aligned-logo-stamp-to-pdfAdd Right-Aligned Logo Stamp to PDFDocument, ImageStamp, AddStampShows how to place an image stamp (logo) at the right margin of each page in a PDF using Aspose.Pdf.
add-semi-transparent-background-stampAdd Semi-Transparent Background Stamp to PDFPdfFileStamp, Stamp, BindPdfDemonstrates how to apply an image as a background stamp on all pages of a PDF with 30% opacity u...
add-transparent-confidential-text-stampAdd Transparent Confidential Text Stamp to Selected PDF Page...Document, PdfFileStamp, FormattedTextDemonstrates applying a 70% opaque red "CONFIDENTIAL" text stamp to specific pages of a PDF using...
apply-custom-line-height-stampApply Custom Line-Height Stamp to PDFStamp, PdfFileStamp, FormattedTextDemonstrates how to create a multi‑line watermark with custom line spacing using a formatted text...
apply-external-pdf-template-stampApply External PDF Template as Stamp on a Specific PagePdfFileStamp, Stamp, BindPdfShows how to create a PdfFileStamp from an external template PDF and apply it only to the third p...
apply-image-stamp-to-all-pdf-pagesApply Image Stamp to All PDF PagesPdfFileStamp, Stamp, BindPdfDemonstrates using PdfFileStamp and Stamp to add a semi‑transparent image stamp to every page of ...
apply-pdf-page-stamp-as-backgroundApply PDF Page Stamp as Background to All PagesPdfFileStamp, Stamp, BindPdfDemonstrates how to use Aspose.Pdf.Facades to stamp every page of a PDF with the first page of an...
apply-rotated-image-stamp-to-pdf-pagesApply Rotated Image Stamp to PDF PagesPdfFileStamp, Stamp, DocumentDemonstrates how to add an image stamp rotated by 30° to the bottom‑right corner of every page in...
apply-rotated-text-stamp-odd-pagesApply Rotated Text Stamp to Odd PagesDocument, TextStamp, FindFontDemonstrates adding a 30‑degree rotated text stamp to the left margin of every odd‑numbered page ...
apply-rotating-stamps-to-pdf-pagesApply Rotating Stamps to Each PDF PageDocument, PdfFileStamp, StampDemonstrates how to add a text stamp to every page of a PDF and rotate each stamp based on the pa...
...and 18 more files

Category Statistics

  • Total examples: 48

Category-Specific Tips

Key API Surface

  • Aspose.Pdf.Facades.EncodingType
  • Aspose.Pdf.Facades.FontStyle
  • Aspose.Pdf.Facades.FormattedText
  • Aspose.Pdf.Facades.PdfContentEditor
  • Aspose.Pdf.Facades.PdfFileStamp
  • Aspose.Pdf.Facades.PdfFileStamp.AddHeader(System.IO.Stream, int)
  • Aspose.Pdf.Facades.PdfFileStamp.BindPdf(string)
  • Aspose.Pdf.Facades.PdfFileStamp.Close()
  • Aspose.Pdf.Facades.PdfFileStamp.Save(string)
  • Aspose.Pdf.Facades.Stamp
  • Aspose.Pdf.Facades.StampInfo
  • System.Drawing.Color
  • System.Drawing.Image

Rules

  • Create a PdfFileStamp instance, bind it to {input_pdf} with BindPdf, then call AddFooter({image_stream}, {int}) to place the image footer on each page, finally Save({output_pdf}) and Close() the stamp object.
  • The image for the footer must be provided as a readable Stream (e.g., FileStream opened with FileMode.Open); the integer argument specifies the vertical offset (in points) from the bottom edge of the page.
  • Instantiate a PdfFileStamp object, then call BindPdf({input_pdf}) to load the source document.
  • Call AddHeader({image_stream}, {int}) on the bound PdfFileStamp to place an image header on each page, where the integer specifies the vertical offset from the top.
  • Save the modified document with Save({output_pdf}) and release resources with Close().

Warnings

  • PdfFileStamp belongs to the Aspose.Pdf.Facades namespace, which may be deprecated in newer releases; consider using the Document class with Stamp objects for future compatibility.
  • The example does not explicitly dispose the FileStream; callers should ensure proper disposal of streams to avoid resource leaks.
  • The example uses a raw FileStream without a using statement; callers should ensure the stream is disposed.
  • AddHeader expects the image stream to be positioned at the beginning; callers must reset the stream if reused.
  • Method signatures (e.g., SetOrigin) may accept double rather than float; adjust types accordingly.

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