agentic-net-examples / pages
AGENTS.md2 starsChanged 4 months agoMITView on GitHub
C# examples for pages using Aspose.PDF for .NET
2 other projects use a version of this.
Adopted by
Most recently taken up by
- jablonkai/skillstheir own version, first seen Oct 1, 2026
- marcelrgberger/pages-clitheir own version, first seen Mar 15, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- marcelrgberger/pages-cli★ 16same name
- jablonkai/skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository36 other files it gives its agents.
- accessibility-and-tagged-pdfsAGENTS.md
- aspose-pdf-examplesAGENTS.md
- basic-operationsAGENTS.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
- 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
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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
- Distinctive: line 105
Delete a particular page by invoking {doc}.Pages.Delete({int}) where the integer is the 1‑based page number.
- Distinctive: line 108
Read the total number of pages via {doc}.Pages.Count after the document is successfully loaded.
- Distinctive: line 115
If {output_pdf} already exists it will be overwritten without warning.
≈ “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.
Files
AGENTS - pages
Pages in PDF using C# / .NET -- 100 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 pages category. This folder contains standalone C# examples for pages operations. See the root agents.md for repository-wide conventions and boundaries.
Scope
- This folder contains examples for pages.
- Files are standalone
.csexamples stored directly in this folder.
Required Namespaces
using Aspose.Pdf;(100/100 files) ← category-specificusing Aspose.Pdf.Text;(17/100 files)using Aspose.Pdf.Facades;(3/100 files)using Aspose.Pdf.Annotations;(2/100 files)using Aspose.Pdf.Drawing;(2/100 files)using System;(100/100 files)using System.IO;(98/100 files)using System.Collections.Generic;(5/100 files)using System.Linq;(4/100 files)using System.Text.Json;(1/100 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-bates-numbering-to-pdf-pages | Add Bates Numbering to PDF Pages | Document, Pages, AddBatesNumbering | Shows how to insert Bates numbering stamps starting at 1000 with a dash separator on every page o... |
| add-bates-numbering-to-pdf-pages__v2 | Add Bates Numbering to PDF Pages | Document, Pages, AddBatesNumbering | Loads a PDF document, applies year‑based Bates numbering (format "2026-####") to each page, and s... |
| add-bates-numbering-with-custom-prefix-suffix | Add Bates Numbering with Custom Prefix and Suffix to PDF | Document, PageCollection, AddBatesNumbering | Demonstrates loading a PDF with Aspose.Pdf, applying Bates numbering that includes a custom prefi... |
| add-bates-numbering-with-prefix | Add Bates Numbering with Alphanumeric Prefix to PDF | Document, Pages, AddBatesNumbering | Shows how to load a PDF using Aspose.Pdf, apply Bates numbering with a custom alphanumeric prefix... |
| add-blank-front-matter-page-roman-label | Add Blank Front‑Matter Page with Roman Numeral Label | Document, Page, PageLabel | Demonstrates how to insert a blank page at the beginning of an existing PDF and assign a custom p... |
| add-bold-uppercase-header-to-pdf-pages | Add Bold Uppercase Header to PDF Pages | Document, Page, HeaderFooter | Shows how to insert a bold, uppercase header on every page of a PDF document using Aspose.Pdf. |
| add-chapter-page-numbers-to-pdf | Add Chapter Prefix Page Numbers to PDF | Document, PageNumberStamp, FindFont | Demonstrates how to insert page numbers with a custom "Chapter" prefix on every page of a PDF usi... |
| add-curved-text-watermark-to-pdf-pages | Add Curved Text Watermark to PDF Pages | Document, Page, WatermarkArtifact | Shows how to place a repeated watermark that follows a curved arc across each page of a PDF using... |
| add-custom-page-numbers-to-pdf | Add Custom Page Numbers to PDF | Document, PageNumberStamp, AddStamp | Demonstrates how to load a PDF with Aspose.Pdf, create a PageNumberStamp using the format "Page X... |
| add-diagonal-text-watermark-to-pdf-pages | Add Diagonal Text Watermark to PDF Pages | Document, Page, TextStamp | Shows how to load a PDF, iterate through its pages, and apply a semi‑transparent diagonal text wa... |
| add-generation-date-footer-to-pdf-pages | Add Generation Date Footer to Each PDF Page | Document, Page, FooterArtifact | Demonstrates how to add a text footer with the current generation date to every page of a PDF usi... |
| add-header-logo-image-to-pdf-pages | Add Header Logo Image to PDF Pages | Document, ImageStamp, AddStamp | Shows how to load a PDF, create an ImageStamp for a company logo, align it to the top‑left of eac... |
| add-header-to-first-pdf-page | Add Header Text to First PDF Page Using MarginInfo | Document, HeaderFooter, MarginInfo | Demonstrates how to add a text header to the first page of a PDF by configuring a HeaderFooter wi... |
| add-html-header-to-first-three-pdf-pages | Add HTML Header with CSS to First Three PDF Pages | Document, Page, HtmlFragment | Demonstrates how to embed a styled HTML header into the first three pages of a PDF using Aspose.P... |
| add-image-footer-to-pdf-pages | Add Image Footer with Opacity to PDF Pages | Document, Page, FooterArtifact | Demonstrates how to add an image footer with 30% opacity to every page of a PDF using Aspose.Pdf. |
| add-image-footer-with-scaling-to-pdf-pages | Add Image Footer with Scaling to PDF Pages | Document, Page, Image | Shows how to insert a scaled footer image on every page of a PDF document using Aspose.Pdf. |
| add-image-watermark-with-opacity-to-pdf-pages | Add Image Watermark with Opacity to PDF Pages | Document, ImageStamp, AddStamp | Demonstrates how to overlay a semi‑transparent image (logo) on every page of a PDF using Aspose.P... |
| add-lightgray-background-to-pdf-pages | Add LightGray Background to PDF Pages | Document, Page, Color | Shows how to load a PDF with Aspose.Pdf, iterate over each page, set a LightGray background color... |
| add-multiple-empty-pages-to-pdf | Add Multiple Empty Pages Sequentially to PDF | Document, Pages, PageCollection | Demonstrates how to add a series of empty pages to a PDF by iterating over a list of page counts,... |
| add-page-numbers-to-even-pdf-pages | Add Page Numbers to Even PDF Pages | Document, PageNumberStamp, HorizontalAlignment | Demonstrates loading a PDF with Aspose.Pdf, iterating through its pages, and adding a page number... |
| add-page-numbers-to-odd-pdf-pages | Add Page Numbers to Odd PDF Pages | Document, PageNumberStamp, Put | Demonstrates loading a PDF with Aspose.Pdf, iterating through its pages, and applying a page numb... |
| add-page-numbers-to-pdf | Add Page Numbers to PDF Pages | Document, PageNumberStamp, AddStamp | Shows how to insert a centered page number stamp starting at 1 on every page of a PDF using Aspos... |
| add-page-numbers-with-custom-embedded-font | Add Page Numbers with Custom Embedded Font to PDF | Document, FindFont, Font | Demonstrates how to insert page numbers on every PDF page using a TrueType font loaded from an ex... |
| add-repeating-image-watermark-to-pdf-pages | Add Repeating Image Watermark to PDF Pages | Document, Page, ImageStamp | Demonstrates how to overlay a semi‑transparent image repeatedly in a grid pattern on every page o... |
| add-roman-numeral-page-numbers | Add Roman Numeral Page Numbers to Introductory PDF Pages | Document, PageNumberStamp, NumberingStyle | Demonstrates how to insert page numbers in uppercase Roman numeral format on the first few pages ... |
| add-rotated-image-watermark-to-pdf-pages | Add Rotated Image Watermark to PDF Pages | Document, Page, ImageStamp | Demonstrates how to overlay a 45‑degree rotated, half‑size image as a watermark on every page of ... |
| add-semi-transparent-text-watermark | Add Semi-Transparent Text Watermark with Outline to PDF Page... | Document, AddStamp, TextStamp | Demonstrates how to load a PDF, iterate through its pages, and apply a semi‑transparent text wate... |
| add-superscript-page-numbers-to-pdf | Add Superscript Page Numbers to PDF Pages | Document, Page, PageNumberStamp | Shows how to insert page numbers with a superscript‑style appearance on every page of a PDF using... |
| add-year-text-watermark-to-pdf | Add Year-Based Text Watermark to PDF | Document, AddStamp, TextStamp | Shows how to load a PDF, create a TextStamp that includes the current year, apply it to every pag... |
| adjust-pdf-bleedbox-for-printer-specs | Adjust PDF BleedBox for Printer Specifications | Document, Page, Rectangle | Shows how to read each page's BleedBox, expand it by a margin, and save the modified PDF using As... |
| ... | and 70 more files |
Category Statistics
- Total examples: 100
Category-Specific Tips
Key API Surface
Aspose.Pdf.BackgroundArtifactAspose.Pdf.ColorTypeAspose.Pdf.DocumentAspose.Pdf.Document.PagesAspose.Pdf.Document.SaveAspose.Pdf.PageAspose.Pdf.Page.GetPageRect(bool)Aspose.Pdf.PageCollectionAspose.Pdf.PageCollection.AddAspose.Pdf.RotationAspose.Pdf.Text.TextFragment
Rules
- Load a PDF into a {doc} using new Document({input_pdf}).
- Delete a particular page by invoking {doc}.Pages.Delete({int}) where the integer is the 1‑based page number.
- Persist the changes by calling {doc}.Save({output_pdf}).
- Instantiate a {doc} by calling new Document({input_pdf}) to load a PDF file.
- Read the total number of pages via {doc}.Pages.Count after the document is successfully loaded.
Warnings
- The Delete method expects a 1‑based page index and will throw if the index is out of range.
- The helper method RunExamples.GetDataDir_AsposePdf_Pages() is external to this snippet and must provide a valid directory path.
- The added page inherits the default page size of the document; specify size explicitly if a different layout is required.
- The Add method copies all pages; selective page ranges require additional filtering.
- If {output_pdf} already exists it will be overwritten without warning.
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 pages 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.

