agentleFS
aspose-pdfaspose-pdf/agentic-net-examples/facades-extract-images-and-text/AGENTS.md

agentic-net-examples / facades-extract-images-and-text

AGENTS.md2 starsChanged 4 months agoMITView on GitHub

C# examples for facades-extract-images-and-text using Aspose.PDF for .NET

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

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

    line 123

≈ “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-extract-images-and-text

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

Scope

  • This folder contains examples for facades-extract-images-and-text.
  • Files are standalone .cs examples stored directly in this folder.

Required Namespaces

  • using Aspose.Pdf.Facades; (80/81 files) ← category-specific
  • using Aspose.Pdf; (26/81 files)
  • using Aspose.Pdf.Text; (4/81 files)
  • using Aspose.Pdf.AI; (1/81 files)
  • using Aspose.Pdf.Drawing; (1/81 files)
  • using Aspose.Pdf.Multithreading; (1/81 files)
  • using System; (81/81 files)
  • using System.IO; (81/81 files)
  • using System.Text; (23/81 files)
  • using System.Drawing.Imaging; (20/81 files)
  • using System.Collections.Generic; (18/81 files)
  • using System.Threading.Tasks; (7/81 files)
  • using System.Drawing; (6/81 files)
  • using System.Text.Json; (4/81 files)
  • using Azure.Storage.Blobs; (3/81 files)
  • using System.IO.Compression; (3/81 files)
  • using System.Threading; (3/81 files)
  • using NUnit.Framework; (2/81 files)
  • using System.Security.Cryptography; (2/81 files)
  • using Azure.Storage.Blobs.Models; (1/81 files)
  • using Google.Apis.Storage.v1.Data; (1/81 files)
  • using Google.Cloud.Storage.V1; (1/81 files)
  • using Microsoft.Azure.WebJobs; (1/81 files)
  • using Microsoft.Extensions.Logging; (1/81 files)
  • using Npgsql; (1/81 files)
  • using System.Collections; (1/81 files)
  • using System.Diagnostics; (1/81 files)
  • using System.Drawing.Drawing2D; (1/81 files)

Common Code Pattern

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

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

Files in this folder

FileTitleKey APIsDescription
add-watermark-extract-images-from-pdfAdd Watermark to PDF Pages and Extract ImagesDocument, PdfFileMend, BindPdfDemonstrates how to overlay a PNG watermark on each page of a PDF using PdfFileMend, then extract...
async-pdf-text-image-extractionAsynchronous PDF Text and Image ExtractionPdfExtractor, BindPdf, ExtractTextDemonstrates how to extract text and images from a PDF file asynchronously using Aspose.Pdf's Pdf...
batch-extract-text-from-pdfsBatch Extract Text from PDFsPdfExtractor, BindPdf, ExtractTextShows how to iterate over a folder of PDF files, extract their text with Aspose.Pdf.Facades.PdfEx...
batch-extract-text-from-pdfs__v2Batch Extract Text from PDFs with PdfExtractorPdfExtractor, BindPdf, ExtractTextDemonstrates how to use Aspose.Pdf.Facades.PdfExtractor to extract text from every PDF file in a ...
cancel-pdf-image-extractionCancel PDF Image Extraction with InterruptMonitorPdfExtractor, InterruptMonitor, BindPdfDemonstrates how to use Aspose.Pdf's InterruptMonitor and a CancellationToken to abort a PdfExtra...
check-pdf-contains-textCheck if PDF Contains Text via MemoryStreamPdfExtractor, BindPdf, ExtractTextShows how to bind a PDF to Aspose.Pdf.Facades.PdfExtractor, extract its text into a MemoryStream,...
check-pdf-for-text-and-imagesCheck PDF for Both Text and ImagesPdfExtractor, BindPdf, ExtractTextDemonstrates how to use Aspose.Pdf.Facades.PdfExtractor to determine whether a PDF file contains ...
check-pdf-text-only-by-detecting-imagesCheck if PDF is Text‑Only by Detecting ImagesPdfExtractor, BindPdf, ExtractImageDemonstrates using Aspose.Pdf.Facades.PdfExtractor to determine whether a PDF contains any images...
configurable-pdf-extractionConfigurable PDF Text, Image, and Attachment ExtractionPdfExtractor, BindPdf, ExtractTextDemonstrates reading a JSON configuration to enable or disable text, image, and attachment extrac...
create-a-batch-job-that-processes-pdfs-from-an-azu...Create A Batch Job That Processes Pdfs From An Azure Blob Co...PdfExtractorCreate A Batch Job That Processes Pdfs From An Azure Blob Container Extracting Text And Uploading...
create-contact-sheet-pdf-from-extracted-imagesCreate Contact Sheet PDF from Extracted ImagesPdfExtractor, Document, PageThe example extracts all images from a source PDF using PdfExtractor, then arranges them as thumb...
create-pdf-summary-from-first-three-pagesCreate PDF Summary from First Three Pages TextPdfExtractor, Document, TextFragmentDemonstrates extracting text from the first three pages of a PDF using PdfExtractor and generatin...
extract-all-images-from-pdfExtract All Images from PDF using PdfExtractorPdfExtractor, BindPdf, ExtractImageDemonstrates how to use Aspose.Pdf's PdfExtractor facade to extract every image from a PDF docume...
extract-attachments-compute-sha256Extract PDF Attachments and Compute SHA-256 HashesDocument, FileSpecification, AddDemonstrates creating a PDF with an embedded file, extracting all attachments using Aspose.Pdf.Fa...
extract-embedded-attachments-from-pdfExtract Embedded Attachments from PDFPdfExtractor, BindPdf, ExtractAttachmentDemonstrates how to use Aspose.Pdf.Facades.PdfExtractor to retrieve embedded file attachments fro...
extract-images-and-compress-png-zipExtract Images from PDF and Compress as PNG ZIPPdfExtractor, BindPdf, ExtractImageDemonstrates extracting embedded images from a PDF using Aspose.Pdf.Facades.PdfExtractor, saving ...
extract-images-and-create-thumbnailsExtract Images from PDF and Create ThumbnailsPdfExtractor, BindPdf, ExtractImageShows how to extract images from a PDF using Aspose.Pdf.Facades.PdfExtractor and generate PNG thu...
extract-images-by-keywordExtract Images from PDF Pages Containing a KeywordPdfExtractor, BindPdf, ExtractTextShows how to use PdfExtractor to scan each PDF page for a specific keyword and extract only the i...
extract-images-create-pdf-portfolioExtract Images from PDF and Build an Image PortfolioPdfExtractor, ExtractImage, HasNextImageDemonstrates how to extract all images from an existing PDF using Aspose.Pdf.Facades.PdfExtractor...
extract-images-create-sprite-sheetExtract Images from PDF and Create a Sprite SheetPdfExtractor, BindPdf, ExtractImageDemonstrates how to extract all images from a PDF using Aspose.Pdf.Facades.PdfExtractor and combi...
extract-images-first-page-to-byte-arraysExtract Images from First PDF Page into Byte ArraysDocument, Page, ImageThe example creates a minimal PDF containing an in‑memory BMP image, then uses Aspose.Pdf.Facades...
extract-images-from-encrypted-pdfExtract Images from Encrypted PDF with PasswordPdfExtractor, Password, BindPdfShows how to open an encrypted PDF by supplying the user password and extract all images using As...
extract-images-from-pages-pngExtract Images from Specific PDF Pages as PNGPdfExtractor, BindPdf, StartPageDemonstrates using Aspose.Pdf.Facades.PdfExtractor to extract images from pages 5 through 10 of a...
extract-images-from-pdf-to-temp-folderExtract Images from PDF to Temporary FolderPdfExtractor, BindPdf, ExtractImageDemonstrates extracting all images from a PDF using Aspose.Pdf's PdfExtractor with the default ex...
extract-images-from-pdf-to-uncExtract Images from PDF to UNC Network SharePdfExtractor, BindPdf, ExtractImageDemonstrates using Aspose.Pdf.Facades.PdfExtractor to pull all images from a PDF and save them as...
extract-images-from-pdf-to-zipExtract Images from PDF and Create ZIP ArchivePdfExtractor, BindPdf, ExtractImageDemonstrates how to use Aspose.Pdf to extract all images from a PDF document and package them int...
extract-images-from-pdf-using-pdfextractorExtract Images from PDF Using PdfExtractor with Automatic Di...PdfExtractor, BindPdf, ExtractImageDemonstrates binding a PDF to Aspose.Pdf.Facades.PdfExtractor, extracting all images, and saving ...
extract-images-from-pdf-with-guid-filenamesExtract Images from PDF with GUID FilenamesPdfExtractor, BindPdf, ExtractImageShows how to use Aspose.Pdf.Facades.PdfExtractor to extract all images from a PDF and save each a...
extract-images-from-specific-pdf-pageExtract Images from a Specific PDF PagePdfExtractor, BindPdf, StartPageShows how to extract all images from a single PDF page by setting the StartPage and EndPage prope...
extract-images-html-galleryExtract Images from PDF and Create HTML GalleryPdfExtractor, BindPdf, ExtractImageDemonstrates extracting all images from a PDF using Aspose.Pdf.Facades.PdfExtractor and generatin...
...and 51 more files

Category Statistics

  • Total examples: 81

Category-Specific Tips

Key API Surface

  • Aspose.Pdf.Facades.ExtractImageMode
  • Aspose.Pdf.Facades.PdfContentEditor
  • Aspose.Pdf.Facades.PdfConverter
  • Aspose.Pdf.Facades.PdfExtractor
  • Aspose.Pdf.Facades.PdfExtractor.BindPdf
  • Aspose.Pdf.Facades.PdfExtractor.ExtractText
  • Aspose.Pdf.Facades.PdfExtractor.GetNextPageText
  • Aspose.Pdf.Facades.PdfExtractor.HasNextPageText
  • Aspose.Pdf.Facades.PdfFileEditor
  • Aspose.Pdf.Facades.PdfFileEditor.Extract

Rules

  • BindPdf({input_pdf}) must be called on a PdfContentEditor instance before any editing methods such as ReplaceText.
  • ReplaceText({text_fragment}, {page}, {text_fragment}) replaces all occurrences of the first text fragment on the specified 1‑based page with the second text fragment.
  • Save({output_pdf}) persists the edited PDF; it should be invoked after all edit operations are completed.
  • Use PdfFileEditor.Extract({input_pdf}, new int[] {{int}, {int}, ...}, {output_pdf}) to create a new PDF containing only the listed pages.
  • Page numbers supplied in the int array are 1‑based and must exist in {input_pdf}.

Warnings

  • Page numbers are 1‑based; passing 0 will cause an error.
  • ReplaceText operates only on the specified page and replaces every matching occurrence on that page.
  • The output file will be created or overwritten; ensure the path is correct.
  • The example assumes the input PDF exists at the specified location.
  • The example does not explicitly dispose the FileStream objects; callers should ensure streams are closed or wrapped in using statements.

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-extract-images-and-text 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.