agentleFS
aspose-pdfaspose-pdf/agentic-net-examples/accessibility-and-tagged-pdfs/AGENTS.md

agentic-net-examples / accessibility-and-tagged-pdfs

AGENTS.md2 starsChanged 4 months agoMITView on GitHub

C# examples for accessibility-and-tagged-pdfs 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:

    When creating a tagged PDF, retrieve the ITaggedContent from {doc}.TaggedContent, then call SetTitle({string_literal}) and …

    line 113

≈ “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 - accessibility-and-tagged-pdfs

Accessibility and tagged PDFs in PDF using C# / .NET -- 45 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 accessibility-and-tagged-pdfs category. This folder contains standalone C# examples for accessibility-and-tagged-pdfs operations. See the root agents.md for repository-wide conventions and boundaries.

Scope

  • This folder contains examples for accessibility-and-tagged-pdfs.
  • Files are standalone .cs examples stored directly in this folder.

Required Namespaces

  • using Aspose.Pdf; (43/45 files) ← category-specific
  • using Aspose.Pdf.LogicalStructure; (34/45 files) ← category-specific
  • using Aspose.Pdf.Tagged; (34/45 files) ← category-specific
  • using Aspose.Pdf.Text; (5/45 files)
  • using Aspose.Pdf.Forms; (2/45 files)
  • using Aspose.Pdf.Annotations; (1/45 files)
  • using System; (45/45 files)
  • using System.IO; (44/45 files)
  • using System.Collections.Generic; (6/45 files)
  • using System.Text.Json; (2/45 files)
  • using System.Xml.Linq; (2/45 files)
  • using System.Xml; (1/45 files)
  • using System.Xml.Xsl; (1/45 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-actualtext-to-imagesAdd ActualText to Images for PDF AccessibilityDocument, ITaggedContent, StructureElementDemonstrates how to attach an ActualText attribute to each image in a PDF using Aspose.Pdf's tagg...
add-caption-note-to-figureAdd Caption Note to Figure in Tagged PDFDocument, ITaggedContent, FigureElementDemonstrates how to create a Figure element and attach a Note element as a caption within a tagge...
add-custom-tag-to-paragraphAdd Custom Tag to Paragraph in Tagged PDFDocument, ITaggedContent, StructureElementDemonstrates how to create a tagged PDF, add a paragraph element, assign a custom tag name, and s...
add-external-link-with-title-to-tagged-pdfAdd External Link with Title to a Tagged PDFDocument, ITaggedContent, LinkElementDemonstrates how to insert a clickable external URL into a PDF's tagged structure and set its Tit...
add-internal-page-link-to-tagged-pdfAdd Internal Page Link to Tagged PDFDocument, ITaggedContent, LinkElementDemonstrates how to create a /Link element in a tagged PDF that points to an internal page using ...
add-note-element-to-paragraphAdd Note Element to Paragraph in Tagged PDFDocument, ITaggedContent, StructureElementDemonstrates how to create a note (footnote/endnote) element and attach it as a child of a paragr...
add-page-break-to-tagged-pdfAdd Page Break Element to Tagged PDFDocument, ITaggedContent, StructureElementDemonstrates how to insert a page‑break element into the logical structure tree of a tagged PDF u...
add-placeholder-textbox-form-field-taggedAdd Placeholder TextBox Form Field with Tagged StructureDocument, TextBoxField, RectangleLoads an existing PDF, inserts a TextBox form field with placeholder text, creates a /Form logica...
add-textbox-form-field-tagged-pdfAdd TextBox Form Field and Tag It for AccessibilityDocument, Form, TextBoxFieldDemonstrates how to create a TextBox form field, register it in the AcroForm, and associate it wi...
append-paragraph-actualtext-to-tociAppend Paragraph with ActualText to a TOCI ElementDocument, ITaggedContent, StructureElementDemonstrates how to create a TOCI (Table of Contents Item) element in a tagged PDF, add a paragra...
batch-convert-pdfs-to-tagged-pdfaBatch Convert PDFs to Tagged PDF/A with Auto‑TaggingDocument, AutoTaggingSettings, PdfFormatConversionOptionsDemonstrates how to process a folder of untagged PDFs, enable Aspose.Pdf auto‑tagging, convert ea...
batch-pdfa1b-validation-xml-logs-dashboardBatch PDF/A-1B Validation with XML Logs and Compliance Dashb...Document, Validate, PdfFormatThe example loads all PDF files in a folder, validates each against the PDF/A‑1B standard using A...
batch-tag-pdfs-with-suffixBatch Tag PDFs and Save with SuffixDocument, AutoTaggingSettings, ITaggedContentDemonstrates how to process a folder of PDF files, enable automatic tagging, add missing structur...
batch-validate-pdfs-summary-csvBatch Validate PDFs and Generate Summary CSVDocument, PdfFormat, ValidateDemonstrates how to iterate through a folder of PDF files, validate each against PDF/A‑1B using A...
check-pdf-ua-compliance-and-logCheck PDF/UA Compliance and Log ResultDocument, IsPdfUaCompliantDemonstrates loading a PDF with Aspose.Pdf, checking its PDF/UA accessibility compliance, and app...
create-nested-bullet-numbered-lists-tagged-pdfCreate Nested Bullet and Numbered Lists in a Tagged PDFDocument, Page, TextFragmentDemonstrates how to build a PDF containing a top‑level bullet list and a numbered list with a nes...
create-pdf-with-heading-and-languageCreate PDF with Heading Element and Language AttributeDocument, ITaggedContent, SetLanguageDemonstrates how to create a new PDF, enable tagged content, set the document language, add a lev...
create-tagged-3x4-table-in-pdfCreate Tagged 3x4 Table in PDFDocument, ITaggedContent, TableElementDemonstrates how to use Aspose.Pdf's Tagged Content API to add a 3‑row by 4‑column table with alt...
create-tagged-pdf-table-with-merged-headerCreate Tagged PDF Table with Merged Header CellsDocument, ITaggedContent, StructureElementDemonstrates how to tag a PDF table, add a header row with merged cells, assign the TH role, and ...
create-tagged-pdf-with-tocCreate Tagged PDF with Table of ContentsDocument, ITaggedContent, HeaderElementDemonstrates how to generate a PDF, add tagged headings, configure a dedicated Table of Contents ...
create-tagged-table-with-custom-tagsCreate Tagged Table with Custom DataType Tags and Validate P...Document, ITaggedContent, StructureElementThe example loads a PDF, builds a tagged table structure, assigns custom data‑type tags to indivi...
custom-table-cell-borders-by-row-indexCustom Table Cell Borders by Row IndexDocument, Page, TableShows how to create a PDF table with Aspose.Pdf and apply different background colors (as a visua...
enable-auto-tagging-save-tagged-pdfEnable Automatic Tagging and Save PDF as Tagged PDFDocument, AutoTaggingSettings, ITaggedContentDemonstrates how to activate Aspose.Pdf's auto‑tagging feature, set basic language and title meta...
export-pdf-structure-tree-to-jsonExport PDF Structure Tree to JSONDocument, ITaggedContent, StructureElementShows how to load a PDF, read its tagged logical structure with Aspose.Pdf, convert the hierarchy...
export-structure-tree-to-xml-xsl-reportExport PDF Structure Tree to XML and Generate Report via XSL...Document, Save, XmlSaveOptionsLoads a PDF with Aspose.Pdf, exports its logical structure tree to an XML file using XmlSaveOptio...
export-tagged-pdf-content-to-jsonExport Tagged PDF Content to JSONDocument, ITaggedContent, StructureElementShows how to read a PDF's tagged structure with Aspose.Pdf, build a hierarchical representation, ...
extract-notes-from-tagged-pdfExtract Notes from Tagged PDF to Text FileDocument, ITaggedContent, StructureElementLoads a PDF, accesses its tagged content, finds all NoteElement objects, concatenates their Actua...
extract-pdf-links-to-csvExtract PDF Links to CSVDocument, Page, AnnotationDemonstrates how to load a PDF with Aspose.Pdf, iterate through its pages and link annotations, e...
extract-text-from-tagged-pdf-structureExtract Text from Tagged PDF Structure TreeDocument, ITaggedContent, StructureElementDemonstrates how to load a PDF, access its tagged content, and recursively traverse the logical s...
filter-xml-missing-alt-textFilter XML Errors for Missing Alt TextShows how to load an XML validation report, query for errors of type "MissingAltText", and output...
...and 15 more files

Category Statistics

  • Total examples: 45

Category-Specific Tips

Key API Surface

  • Aspose.Pdf.AttributeKey
  • Aspose.Pdf.AttributeOwnerStandard
  • Aspose.Pdf.BorderInfo
  • Aspose.Pdf.BorderSide
  • Aspose.Pdf.Color
  • Aspose.Pdf.Document
  • Aspose.Pdf.Document.Save
  • Aspose.Pdf.Document.Validate
  • Aspose.Pdf.FontRepository
  • Aspose.Pdf.FontStyles
  • Aspose.Pdf.HorizontalAlignment
  • Aspose.Pdf.ITaggedContent
  • Aspose.Pdf.ITaggedContent.CreateArtElement
  • Aspose.Pdf.ITaggedContent.CreateDivElement
  • Aspose.Pdf.ITaggedContent.CreateSectElement

Rules

  • Obtain the tagged content interface via {doc}.TaggedContent and set metadata using {doc}.TaggedContent.SetTitle({string_literal}) and {doc}.TaggedContent.SetLanguage({string_literal}) before saving.
  • Persist the PDF after configuring tagged metadata with {doc}.Save({output_pdf}).
  • When creating a tagged PDF, retrieve the ITaggedContent from {doc}.TaggedContent, then call SetTitle({string_literal}) and SetLanguage({string_literal}) to define document metadata before adding any structure elements.
  • To insert textual content, use ITaggedContent.CreateParagraphElement() to obtain a ParagraphElement, set its text with SetText({string_literal}), and attach it to the document hierarchy via ITaggedContent.RootElement.AppendChild({paragraph_element}).
  • Persist the tagged PDF by invoking {doc}.Save({output_pdf}).

Warnings

  • The example creates an empty Document; real scenarios may need to add pages/content before saving.
  • SetLanguage expects a BCP‑47 language tag (e.g., "en-US").
  • Assumed fully qualified names for element classes (SectElement, DivElement, ArtElement) are in Aspose.Pdf.Tagged namespace; verify against the library version.
  • StructureTextState properties are applicable only to elements that support text styling; ensure the element type (e.g., ParagraphElement) supports them.
  • The example relies on default page creation; no explicit page handling is shown.

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 accessibility-and-tagged-pdfs 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.