agentic-net-examples / facades-texts-and-images
AGENTS.md2 starsChanged 4 months agoMITView on GitHub
C# examples for facades-texts-and-images using Aspose.PDF for .NET
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-xmp-metadataAGENTS.md
- graphs-zugferd-operatorsAGENTS.md
- pagesAGENTS.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
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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 107
Always release resources by calling Close() on the PdfConverter when finished.
≈ “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 - facades-texts-and-images
Facades texts and images in PDF using C# / .NET -- 28 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 facades-texts-and-images category. This folder contains standalone C# examples for facades-texts-and-images operations. See the root agents.md for repository-wide conventions and boundaries.
Scope
- This folder contains examples for facades-texts-and-images.
- Files are standalone
.csexamples stored directly in this folder.
Required Namespaces
using Aspose.Pdf.Facades;(28/28 files) ← category-specificusing Aspose.Pdf;(14/28 files) ← category-specificusing Aspose.Pdf.Text;(5/28 files)using System;(28/28 files)using System.IO;(27/28 files)using System.Drawing.Imaging;(3/28 files)using System.Drawing;(2/28 files)using System.Linq;(2/28 files)using Microsoft.VisualStudio.TestTools.UnitTesting;(1/28 files)using NUnit.Framework;(1/28 files)using System.Threading;(1/28 files)using System.Threading.Tasks;(1/28 files)
Common Code Pattern
Most files in this category use PdfFileMend from Aspose.Pdf.Facades:
PdfFileMend tool = new PdfFileMend();
tool.BindPdf("input.pdf");
// ... PdfFileMend operations ...
tool.Save("output.pdf");Files in this folder
| File | Title | Key APIs | Description |
| add-background-png-to-all-pdf-pages | Add Background PNG to All PDF Pages | Document, Rect, BindPdf | Shows how to load a PDF, retrieve each page's dimensions, and overlay a PNG image as a background... |
| add-header-image-to-pdf-documents | Add Header Image to PDF Documents | PdfFileStamp, BindPdf, AddHeader | Shows how to insert a header image into one or more PDF files using Aspose.Pdf.Facades.PdfFileSta... |
| add-image-and-text-to-pdf-with-audit-logging | Add Image and Text to PDF with Audit Logging | Document, PdfFileMend, AddImage | Loads a PDF, adds an image and a formatted text watermark to page 1, logs each AddImage and AddTe... |
| add-image-and-text-watermark-to-pdf | Add Image and Semi‑Transparent Text Watermark to PDF | PdfFileStamp, Stamp, FormattedText | Demonstrates how to combine an image and semi‑transparent text into a single stamp and apply it a... |
| add-image-to-each-pdf-page-dynamic-position | Add Image to Each PDF Page with Dynamic Positioning | Document, Page, PdfFileMend | Loads a PDF, calculates each page's dimensions, and places a PNG image in the bottom‑right corner... |
| add-image-to-pdf-page | Add Image to Specific PDF Page | PdfFileMend, BindPdf, AddImage | Shows how to use Aspose.Pdf.Facades to insert an image onto a chosen page of a PDF at given recta... |
| add-image-to-pdf-using-pdffilemend | Add Image to PDF Using PdfFileMend with Try‑Finally | PdfFileMend, BindPdf, AddImage | Demonstrates how to bind a PDF, insert an image on a page, save the result, and guarantee that Pd... |
| add-image-to-pdf-with-format-validation | Add Image to PDF with Format Validation | PdfFileMend, BindPdf, AddImage | Demonstrates how to validate an image's file format and then add the image to a PDF page using As... |
| add-image-verify-pdf-byte-size | Add Image to PDF and Verify Byte Size Increase | Document, PdfFileMend, BindPdf | Creates a minimal PDF, binds it with PdfFileMend, adds a PNG image, saves the modified document, ... |
| add-images-to-pdf-with-error-handling | Add Images to PDF with Error Handling | PdfFileMend, AddImage, Close | Demonstrates how to insert multiple images into a PDF using Aspose.Pdf's PdfFileMend facade while... |
| add-multi-line-text-block-page-3 | Add Multi‑Line Text Block with Custom Line Spacing to Page 3 | PdfFileMend, Document, Page | Demonstrates how to use the PdfFileMend facade to bind an existing PDF, create a multi‑line TextP... |
| add-png-image-to-pdf-page | Add PNG Image to Specific PDF Page using PdfFileMend | PdfFileMend, BindPdf, AddImage | Demonstrates how to bind an existing PDF with PdfFileMend, insert a PNG image onto page two at de... |
| add-promotional-text-to-specific-pdf-pages | Add Promotional Text to Specific PDF Pages | PdfFileStamp, Stamp, FormattedText | Shows how to insert the same promotional message on pages 3, 5, and 7 of a PDF using Aspose.Pdf's... |
| add-text-at-coordinates-verify-position | Add Text at Specific Coordinates and Verify Position | Document, Page, TextFragment | Creates a blank PDF, adds a text fragment at defined X/Y coordinates using TextBuilder, saves and... |
| add-tiff-image-to-last-page-pdf | Add TIFF Image to Last Page of PDF using PdfFileMend | PdfFileMend, BindPdf, AddImage | Demonstrates how to use Aspose.Pdf.Facades.PdfFileMend to embed a TIFF image onto the final page ... |
| add-wrapped-footer-to-pdf-pages | Add Word‑by‑Word Wrapped Footer to PDF Pages | Document, PageInfo, FormattedText | Shows how to use Aspose.Pdf Facade API to add a formatted footer that wraps word‑by‑word across t... |
| async-add-image-to-pdf | Asynchronously Add Image to PDF Using PdfFileMend | PdfFileMend, BindPdf, AddImage | Demonstrates how to modify a PDF on a background thread by adding an image to the first page with... |
| batch-add-company-logo-to-pdfs | Batch Add Company Logo to PDFs | PdfFileMend, BindPdf, AddImage | Shows how to process all PDF files in a folder and overlay a PNG company logo at the top‑right co... |
| batch-extract-images-from-pdfs | Batch Extract Images from PDFs with Page and Index Naming | PdfExtractor, BindPdf, StartPage | Shows how to process multiple PDF files, extract images from each page using Aspose.Pdf.Facades.P... |
| configure-word-wrapping-bywords-add-long-text | Configure Word Wrapping ByWords and Add Long Text to PDF | Document, PdfFileMend, IsWordWrap | The example shows how to enable word wrapping on a PDF using PdfFileMend, set the wrap mode to By... |
| extract-images-from-pdf-pages | Extract Images from Specific PDF Pages | PdfExtractor, BindPdf, StartPage | Shows how to use Aspose.Pdf.Facades.PdfExtractor to extract all images from pages 2‑5 of a PDF an... |
| extract-images-from-pdf-to-png | Extract Images from PDF to PNG using PdfExtractor | PdfExtractor, BindPdf, ExtractImage | Demonstrates how to use Aspose.Pdf's PdfExtractor to extract all images from a PDF document and s... |
| insert-png-signature-image-on-every-pdf-page | Insert PNG Signature Image on Every PDF Page | PdfFileMend, BindPdf, AddImage | Demonstrates how to use PdfFileMend to add a PNG signature image to the bottom‑left corner of eac... |
| overlay-semi-transparent-gif-on-pdf | Overlay Semi-Transparent GIF on PDF | PdfFileMend, BindPdf, AddImage | Demonstrates how to place a semi‑transparent GIF over an existing PNG in a PDF using CompositingP... |
| remove-all-images-from-pdf | Remove All Images from PDF | PdfContentEditor, BindPdf, DeleteImage | Shows how to delete every image in a PDF using Aspose.Pdf's PdfContentEditor facade and save the ... |
| remove-image-from-pdf-page | Remove Image from Specific PDF Page | PdfContentEditor, BindPdf, DeleteImage | Demonstrates how to delete a particular image identified by its object ID from page four of a PDF... |
| replace-jpeg-with-bmp-first-page | Replace JPEG with High‑Resolution BMP on First PDF Page | Document, PdfContentEditor, BindPdf | Demonstrates how to replace the first image on page one of a PDF with a higher‑resolution BMP usi... |
| replace-low-res-images-with-high-res-pngs | Replace Low-Resolution Images with High-Resolution PNGs in P... | Document, PdfContentEditor, PdfExtractor | Demonstrates how to iterate through each page of a PDF, detect embedded images, and replace low‑r... |
Category Statistics
- Total examples: 28
Category-Specific Tips
Key API Surface
Aspose.Pdf.CgmImportOptionsAspose.Pdf.Facades.ExtractImageModeAspose.Pdf.Facades.ImportFormatAspose.Pdf.Facades.PdfContentEditorAspose.Pdf.Facades.PdfContentEditor.BindPdf(string)Aspose.Pdf.Facades.PdfContentEditor.DeleteImage()Aspose.Pdf.Facades.PdfContentEditor.DeleteImage(int, int[])Aspose.Pdf.Facades.PdfContentEditor.Save(string)Aspose.Pdf.Facades.PdfConverterAspose.Pdf.Facades.PdfExtractorAspose.Pdf.Facades.PdfFileMendAspose.Pdf.Facades.PdfPageEditorAspose.Pdf.Facades.PdfProducer
Rules
- Bind a PDF file to a PdfConverter with BindPdf({input_pdf}) before any conversion.
- Invoke DoConvert() on the PdfConverter to initialize the conversion process.
- Export the bound PDF to a TIFF image using SaveAsTIFF({output_tiff}) after DoConvert() has been called.
- Always release resources by calling Close() on the PdfConverter when finished.
- Bind the PDF document to a PdfExtractor instance using BindPdf({input_pdf}) before any extraction operation.
Warnings
- PdfConverter belongs to the Aspose.Pdf.Facades namespace, which may be considered legacy in newer SDK versions; verify compatibility.
- The example uses System.Drawing.Imaging.ImageFormat for the output format, which may require additional NuGet packages (e.g., System.Drawing.Common) on non‑Windows platforms.
- GetNextImage overwrites files if the generated {output_image_path} collides; ensure unique filenames.
- GetNextImage writes the image data to the provided stream; the stream should be positioned appropriately before further use.
- The example writes images to files using DateTime.Now.Ticks for naming, which may cause naming collisions in rapid successive runs.
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-texts-and-images 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.

