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

agentic-net-examples / conversion

AGENTS.md2 starsChanged 4 months agoMITView on GitHub

C# examples for conversion using Aspose.PDF for .NET

2 other projects use a version of this.

Adopted by

Most recently taken up by

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:

    Create a {load_options} of type Aspose.Pdf.SvgLoadOptions and use it to instantiate a {doc} from an {input_svg} file path.

    line 121

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

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

Scope

  • This folder contains examples for conversion.
  • Files are standalone .cs examples stored directly in this folder.

Required Namespaces

  • using Aspose.Pdf; (101/101 files) ← category-specific
  • using Aspose.Pdf.Devices; (17/101 files)
  • using Aspose.Pdf.Text; (8/101 files)
  • using Aspose.Pdf.Annotations; (3/101 files)
  • using Aspose.Pdf.Drawing; (1/101 files)
  • using Aspose.Pdf.Facades; (1/101 files)
  • using Aspose.Pdf.LogicalStructure; (1/101 files)
  • using Aspose.Pdf.Tagged; (1/101 files)
  • using System; (101/101 files)
  • using System.IO; (101/101 files)
  • using System.IO.Compression; (5/101 files)
  • using System.Text; (4/101 files)
  • using System.Collections.Generic; (2/101 files)
  • using System.Linq; (2/101 files)
  • using System.Text.RegularExpressions; (2/101 files)
  • using System.Xml.Linq; (2/101 files)
  • using System.Diagnostics; (1/101 files)
  • using System.Drawing; (1/101 files)
  • using System.Text.Json; (1/101 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

FileTitleKey APIsDescription
add-external-text-file-attachment-to-pdfa3bAdd External Text File Attachment to PDF/A‑3b DocumentDocument, FileSpecification, FileAttachmentAnnotationDemonstrates how to embed an external text file as a file attachment annotation and convert the P...
add-external-xml-attachment-to-pdfaAdd External XML Attachment to PDF/A‑1b DocumentDocument, Convert, FileSpecificationDemonstrates converting a PDF to PDF/A‑1b and attaching an external XML file as a file‑attachment...
batch-convert-pdfs-to-jpeg-custom-namingBatch Convert PDFs to JPEG with Custom NamingDocument, JpegDevice, ResolutionDemonstrates how to convert all PDF files in a folder to JPEG images page‑by‑page using Aspose.Pd...
batch-convert-pdfs-to-multi-page-tiffBatch Convert PDFs to Multi‑Page TIFFDocument, Add, TiffDeviceDemonstrates how to merge several PDF files into a single document and then convert the combined ...
batch-convert-pdfs-to-pngBatch Convert PDFs to PNG Preserving Folder StructureDocument, PngDevice, ResolutionDemonstrates how to recursively locate PDF files, keep their relative folder hierarchy, and conve...
batch-convert-pdfs-to-pptx-slides-as-imagesBatch Convert PDFs to PPTX with SlidesAsImagesDocument, ctor, PptxSaveOptionsIterates through PDF files in a folder and converts each to a PPTX presentation using Aspose.Pdf,...
convert-epub-to-pdf-custom-page-sizeConvert EPUB to PDF with Custom Page SizeEpubLoadOptions, Document, SaveDemonstrates loading an EPUB file with EpubLoadOptions to set a custom page size and converting i...
convert-latex-to-pdfConvert LaTeX (.tex) to PDF with Aspose.PdfTeXLoadOptions, Document, SaveDemonstrates loading a LaTeX (.tex) file using Aspose.Pdf's TeXLoadOptions and converting it to a...
convert-markdown-to-pdf-preserving-code-blocksConvert Markdown to PDF Preserving Code BlocksMdLoadOptions, Document, SaveDemonstrates loading a Markdown file with MdLoadOptions and converting it to a PDF while keeping ...
convert-ofd-to-pdfConvert OFD to PDF with Aspose.PdfDocument, OfdLoadOptions, SaveDemonstrates loading an OFD file using OfdLoadOptions and saving it as a PDF with default settings.
convert-pcl-to-pdf-hpgl2Convert PCL to PDF with HP‑GL/2 VectorsPclLoadOptions, Document, ctorDemonstrates loading a PCL file (including HP‑GL/2 vector data) using Aspose.Pdf and saving it as...
convert-pdf-page-to-jpegConvert PDF Page to JPEG ImageDocument, JpegDevice, PageDemonstrates how to load a PDF, validate a page number, and convert that specific page to a JPEG ...
convert-pdf-pages-to-separate-html-filesConvert PDF Pages to Separate HTML FilesDocument, HtmlSaveOptions, SaveDemonstrates how to use Aspose.Pdf to convert each page of a PDF into its own HTML file by enabli...
convert-pdf-to-bmp-imagesConvert PDF to BMP ImagesDocument, BmpDevice, PagesShows how to load a PDF with Aspose.Pdf, iterate through its pages, and render each page to a BMP...
convert-pdf-to-doc-defaultConvert PDF to DOC with Default SettingsDocument, DocSaveOptions, DocFormatDemonstrates converting a PDF file to the legacy DOC format using Aspose.Pdf with default text ex...
convert-pdf-to-doc-image-extractionConvert PDF to DOC with Image Extraction (Textbox Mode)Document, DocSaveOptions, FormatDemonstrates how to convert a PDF file to a DOC document using Aspose.Pdf with custom recognition...
convert-pdf-to-doc-plain-textConvert PDF to DOC with Plain Text ExtractionDocument, DocSaveOptions, DocFormatShows how to convert a PDF file to a DOC file using Aspose.Pdf, configuring DocSaveOptions to ext...
convert-pdf-to-docx-add-table-of-figuresConvert PDF to DOCX and Add Table of FiguresDocument, Page, XImageDemonstrates converting a PDF file to DOCX using Aspose.Pdf while extracting images, generating c...
convert-pdf-to-docx-and-pdfaConvert PDF to DOCX and then to PDF/ADocument, DocSaveOptions, DocFormatDemonstrates loading a PDF with Aspose.Pdf, converting it to a DOCX file, and then creating a PDF...
convert-pdf-to-docx-and-zipConvert PDF to DOCX and Zip the ResultDocument, DocSaveOptions, SaveShows how to use Aspose.Pdf to convert a PDF file to DOCX format and then compress the generated ...
convert-pdf-to-docx-auto-detectionConvert PDF to DOCX with Automatic Content DetectionDocument, DocSaveOptions, DocFormatDemonstrates how to convert a PDF file to DOCX using Aspose.Pdf with the DocSaveOptions.Mode set ...
convert-pdf-to-docx-enhanced-flowConvert PDF to DOCX with Enhanced Flow ModeDocument, DocSaveOptions, RecognitionModeDemonstrates how to convert a PDF file to a DOCX document using Aspose.Pdf with the enhanced flow...
convert-pdf-to-docx-extract-imagesConvert PDF to DOCX and Extract Embedded ImagesDocument, DocSaveOptions, SaveDemonstrates how to convert a PDF file to DOCX format using Aspose.Pdf and then iterate through e...
convert-pdf-to-docx-layoutConvert PDF to DOCX with Layout PreservationDocument, DocSaveOptions, RecognitionModeDemonstrates converting a PDF file to a DOCX document using Aspose.Pdf's standard textbox recogni...
convert-pdf-to-docx-with-embedded-fontsConvert PDF to DOCX with Embedded FontsDocument, DocSaveOptions, DocFormatDemonstrates converting a PDF file to a DOCX document using Aspose.Pdf while embedding fonts to p...
convert-pdf-to-docx-with-footnotesConvert PDF to DOCX with Footnotes PreservationDocument, DocSaveOptions, DocFormatDemonstrates converting a PDF file to DOCX using Aspose.Pdf while preserving footnotes by enablin...
convert-pdf-to-docx-with-hyphenationConvert PDF to DOCX with Hyphenation and Flow SettingsDocument, DocSaveOptions, FormatDemonstrates converting a PDF file to DOCX using Aspose.Pdf while applying flow‑based recognition...
convert-pdf-to-docx-with-metadataConvert PDF to DOCX with Author and Title MetadataDocument, DocumentInfo, DocSaveOptionsDemonstrates loading a PDF with Aspose.Pdf, setting author and title metadata, and converting it ...
convert-pdf-to-docx-with-statsConvert PDF to DOCX with Conversion StatisticsDocument, DocSaveOptions, DocFormatDemonstrates how to use Aspose.Pdf to convert a PDF file to DOCX format while capturing conversio...
convert-pdf-to-emf-imagesConvert PDF Pages to EMF Images with Vector PreservationDocument, EmfDevice, ResolutionDemonstrates how to load a PDF document and convert each page to an EMF image using Aspose.Pdf's ...
...and 71 more files

Category Statistics

  • Total examples: 101

Category-Specific Tips

Key API Surface

  • Aspose.Pdf.CgmLoadOptions
  • Aspose.Pdf.ConvertErrorAction
  • Aspose.Pdf.Document
  • Aspose.Pdf.Document.Save
  • Aspose.Pdf.EpubLoadOptions
  • Aspose.Pdf.ExcelSaveOptions
  • Aspose.Pdf.ExcelSaveOptions.ExcelFormat
  • Aspose.Pdf.FileSpecification
  • Aspose.Pdf.Image
  • Aspose.Pdf.LoadOptions
  • Aspose.Pdf.MarginInfo
  • Aspose.Pdf.MdLoadOptions
  • Aspose.Pdf.MhtLoadOptions
  • Aspose.Pdf.Page
  • Aspose.Pdf.Page.Paragraphs

Rules

  • Load a PDF file {input_pdf} into an Aspose.Pdf.Document instance and call Document.Save({output_excel}, ExcelSaveOptions) to export to Excel.
  • Set ExcelSaveOptions.Format = ExcelSaveOptions.ExcelFormat.XLSX to generate an .xlsx file instead of the default .xls.
  • Set ExcelSaveOptions.InsertBlankColumnAtFirst = {bool} to control whether a blank column is added at the beginning of each worksheet.
  • Set ExcelSaveOptions.MinimizeTheNumberOfWorksheets = {bool} to combine all PDF pages into a single worksheet when true.
  • Create a {load_options} of type Aspose.Pdf.SvgLoadOptions and use it to instantiate a {doc} from an {input_svg} file path.

Warnings

  • The example assumes the presence of an input PDF file at the specified path.
  • Output file paths are hard‑coded; in production code they should be configurable.
  • The example assumes the CGM file exists at the specified path and that the Aspose.PDF license (if required) is already configured.
  • The example assumes the presence of a valid Aspose.PDF license; without it, the output may contain a watermark.
  • Placeholder {string_literal} is used for both input and output file paths; adjust as needed for your environment.

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