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

agentic-net-examples / facades-pages

AGENTS.md2 starsChanged 4 months agoMITView on GitHub

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

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
  1. Distinctive:

    Use PdfFileEditor.Delete({input_pdf_stream}, {int[] pagesToDelete}, {output_pdf_stream}) to remove the specified pages (1‑based indices) …

    line 98
  2. Distinctive:

    When working with streams, open the source PDF with FileMode.Open and create the destination PDF with FileMode.Create, then pass the …

    line 99
  3. Distinctive:

    Use PdfFileEditor.Extract({input_pdf}, new int[] {{int}, {int}, ...}, {output_pdf}) to create a new PDF containing only the listed pages.

    line 100

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

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

Scope

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

Required Namespaces

  • using Aspose.Pdf.Facades; (115/117 files) ← category-specific
  • using Aspose.Pdf; (78/117 files) ← category-specific
  • using Aspose.Pdf.Text; (6/117 files)
  • using Aspose.Pdf.Annotations; (1/117 files)
  • using Aspose.Pdf.Forms; (1/117 files)
  • using System; (117/117 files)
  • using System.IO; (108/117 files)
  • using System.Collections.Generic; (10/117 files)
  • using System.Linq; (1/117 files)
  • using System.Reflection; (1/117 files)

Common Code Pattern

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

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

Files in this folder

FileTitleKey APIsDescription
add-10-percent-margins-to-pdf-pagesAdd 10% Margins to All PDF PagesPdfFileEditor, AddMarginsPctDemonstrates how to use Aspose.Pdf.Facades.PdfFileEditor to add a uniform 10 % margin on all side...
add-15-percent-margins-to-pdf-pagesAdd 15% Margins to PDF Pages for Booklet LayoutPdfFileEditor, AddMarginsPctShows how to apply a 15 % margin to selected or all pages of a PDF using Aspose.Pdf.Facades, impr...
add-20-percent-margins-to-pdf-pagesAdd 20% Margins to PDF PagesPdfFileEditor, AddMarginsPctDemonstrates how to add uniform 20 % margins around each page of a PDF using Aspose.Pdf.Facades.P...
add-5-percent-margins-and-print-pdfAdd 5% Margins and Print PDFPdfFileEditor, PdfViewer, AddMarginsPctShows how to add a 5 % margin to every page of a PDF using PdfFileEditor and then print the modif...
add-fade-transition-to-pdf-pageAdd Fade Transition to PDF PageDocument, PdfPageEditor, TransitionTypeDemonstrates how to set a fade page transition with a two‑second duration on the first page of a ...
adjust-page-zoom-based-on-word-countAdjust Page Zoom Based on Word CountDocument, PdfPageEditor, TextAbsorberDemonstrates how to analyze each PDF page's word count and apply a dynamic zoom factor—higher zoo...
align-page-three-vertically-topAlign Page Three Vertically to Top Using PdfPageEditorDocument, PdfPageEditor, BindPdfShows how to vertically align the content of page 3 of a PDF to the top using Aspose.Pdf's PdfPag...
align-page-two-leftAlign Page Two Left in PDFDocument, PdfPageEditor, ProcessPagesDemonstrates how to left‑justify the content of the second page of a PDF using Aspose.Pdf's PdfPa...
apply-custom-page-transitionsApply Custom Page Transitions Based on IndexDocument, PdfPageEditor, BindPdfShows how to assign different transition effects to each PDF page using Aspose.Pdf's PdfPageEdito...
apply-different-zoom-levels-to-pdf-pagesApply Different Zoom Levels to PDF PagesPdfPageEditor, BindPdf, GetPagesShows how to assign a distinct zoom factor to each page of a PDF using the Aspose.Pdf.Facades.Pdf...
apply-dissolve-transition-to-pdf-pageApply Dissolve Transition to a Specific PDF PageDocument, PdfPageEditor, ApplyChangesDemonstrates how to set a three‑second Dissolve page transition on page 5 of a PDF using Aspose.P...
apply-fade-transition-to-all-pdf-pagesApply Fade Transition to All PDF PagesDocument, PdfPageEditor, BindPdfShows how to set a uniform Fade (Dissolve) transition and duration for every page in a PDF using ...
apply-horizontal-alignment-to-pdf-pagesApply Horizontal Alignment to PDF PagesPdfPageEditor, BindPdf, HorizontalAlignmentShows how to set left‑justified horizontal alignment for all pages of a PDF using the PdfPageEdit...
apply-page-transitions-by-indexApply Different Page Transitions Based on IndexDocument, PdfPageEditor, BindPdfDemonstrates how to assign a different transition effect to each PDF page using Aspose.Pdf.Facade...
apply-rotation-size-zoom-to-pdf-pagesApply Rotation, Size, and Zoom to PDF PagesPdfPageEditor, BindPdf, ApplyChangesDemonstrates using Aspose.Pdf's PdfPageEditor facade to rotate pages, change the page size, apply...
apply-transition-to-odd-pagesApply Transition to Odd Pages in PDFDocument, PdfPageEditor, BindPdfShows how to add a page transition effect only to odd‑numbered pages of a PDF using Aspose.Pdf's ...
apply-vertical-alignment-to-selected-pdf-pagesApply Vertical Alignment to Selected PDF PagesPdfPageEditor, BindPdf, ProcessPagesDemonstrates how to vertically align the content of specific pages in a PDF to the top using Aspo...
apply-zoom-to-non-consecutive-pdf-pagesApply Zoom to Non-Consecutive PDF PagesPdfPageEditor, BindPdf, ProcessPagesShows how to select specific non‑consecutive pages using the ProcessPages array and apply a commo...
assign-page-transitions-by-contentAssign Page Transitions Based on Content TypeDocument, Page, PdfPageEditorShows how to use Aspose.Pdf.Facades.PdfPageEditor to set different transition effects for image a...
audit-pdf-page-dimensions-rotationAudit PDF Page Dimensions and Rotation Before and After Edit...PdfPageEditor, BindPdf, GetPagesShows how to log each PDF page's width, height, and rotation, apply a rotation to a page, and sav...
batch-adjust-pdf-page-sizeBatch Adjust PDF Page Size to A4Document, PdfPageEditor, PageSizeShows how to process all PDFs in a folder and set each page to a specific size (e.g., A4) using A...
batch-convert-pdfs-to-a4Batch Convert PDFs to A4 Page SizePdfPageEditor, BindPdf, ApplyChangesShows how to iterate over PDF files in a directory and resize each document to A4 using Aspose.Pd...
batch-rotate-first-page-pdfsBatch Rotate First Page of PDFsPdfPageEditor, BindPdf, PageRotationsShows how to process all PDF files in a folder and rotate the first page of each document by 90° ...
batch-set-fade-transition-pdf-slideshowBatch Set Fade Transition for PDF SlideshowDocument, PdfPageEditor, TransitionTypeDemonstrates how to apply a fade (dissolve) transition with a 2‑second duration to all pages of a...
center-page-content-horizontallyCenter Page Content Horizontally Using PdfPageEditorPdfPageEditor, BindPdf, ProcessPagesShows how to use Aspose.Pdf.Facades.PdfPageEditor to center the existing content of a specific pa...
center-page-content-set-display-durationCenter Page Content and Set Display Duration on a Specific P...PdfPageEditor, Document, BindPdfDemonstrates how to center the content of a specific PDF page and set its display duration using ...
chain-page-rotation-size-zoom-modificationsChain Page Rotation, Size, and Zoom ModificationsDocument, PdfPageEditor, RotationDemonstrates how to use PdfPageEditor to rotate, resize, zoom, and reposition PDF pages in a sing...
change-pdf-page-size-and-undoChange PDF Page Size and Undo to OriginalPdfPageEditor, BindPdf, GetPageSizeShows how to capture a PDF's original page size, apply a custom size to all pages, save the modif...
change-pdf-page-size-to-a3Change PDF Page Size to A3 Using PdfPageEditorPdfPageEditor, BindPdf, PageSizeShows how to resize all pages of a PDF to A3 dimensions and optionally increase resolution using ...
combine-page-rotation-zoom-presentationCombine Page Rotation, Zoom, and Transitions for PDF Present...Document, PdfPageEditor, BindPdfShows how to rotate, zoom, and apply slide transition effects to every page of a PDF using Aspose...
...and 87 more files

Category Statistics

  • Total examples: 117

Category-Specific Tips

Key API Surface

  • Aspose.Pdf.Facades.PdfFileEditor
  • Aspose.Pdf.Facades.PdfFileEditor.Delete
  • Aspose.Pdf.Facades.PdfFileEditor.Extract
  • Aspose.Pdf.Facades.PdfFileEditor.SplitToEnd

Rules

  • Instantiate Aspose.Pdf.Facades.PdfFileEditor and call Delete({input_pdf}, {int[]} pagesToDelete, {output_pdf}) to remove the specified pages.
  • The page numbers in the array are 1‑based indices representing the pages to be removed.
  • Use PdfFileEditor.Delete({input_pdf_stream}, {int[] pagesToDelete}, {output_pdf_stream}) to remove the specified pages (1‑based indices) from a PDF without loading it into a Document object.
  • When working with streams, open the source PDF with FileMode.Open and create the destination PDF with FileMode.Create, then pass the streams to PdfFileEditor.Delete.
  • Use PdfFileEditor.Extract({input_pdf}, new int[] {{int}, {int}, ...}, {output_pdf}) to create a new PDF containing only the listed pages.

Warnings

  • The example does not explicitly dispose the FileStream objects; callers should ensure streams are closed or wrapped in using statements.
  • The output file will be created or overwritten; ensure the path is correct.
  • The example assumes the input PDF exists at the specified location.
  • Page numbers must be within the bounds of the source document; otherwise an exception will be thrown.
  • Insert overwrites the output file if it already exists.

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