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
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.
- 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-texts-and-imagesAGENTS.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 113
When creating a tagged PDF, retrieve the ITaggedContent from {doc}.TaggedContent, then call SetTitle({string_literal}) and …
≈ “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 - 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
.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 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
.csexamples stored directly in this folder.
Required Namespaces
using Aspose.Pdf;(43/45 files) ← category-specificusing Aspose.Pdf.LogicalStructure;(34/45 files) ← category-specificusing Aspose.Pdf.Tagged;(34/45 files) ← category-specificusing 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
| File | Title | Key APIs | Description |
| add-actualtext-to-images | Add ActualText to Images for PDF Accessibility | Document, ITaggedContent, StructureElement | Demonstrates how to attach an ActualText attribute to each image in a PDF using Aspose.Pdf's tagg... |
| add-caption-note-to-figure | Add Caption Note to Figure in Tagged PDF | Document, ITaggedContent, FigureElement | Demonstrates how to create a Figure element and attach a Note element as a caption within a tagge... |
| add-custom-tag-to-paragraph | Add Custom Tag to Paragraph in Tagged PDF | Document, ITaggedContent, StructureElement | Demonstrates how to create a tagged PDF, add a paragraph element, assign a custom tag name, and s... |
| add-external-link-with-title-to-tagged-pdf | Add External Link with Title to a Tagged PDF | Document, ITaggedContent, LinkElement | Demonstrates how to insert a clickable external URL into a PDF's tagged structure and set its Tit... |
| add-internal-page-link-to-tagged-pdf | Add Internal Page Link to Tagged PDF | Document, ITaggedContent, LinkElement | Demonstrates how to create a /Link element in a tagged PDF that points to an internal page using ... |
| add-note-element-to-paragraph | Add Note Element to Paragraph in Tagged PDF | Document, ITaggedContent, StructureElement | Demonstrates how to create a note (footnote/endnote) element and attach it as a child of a paragr... |
| add-page-break-to-tagged-pdf | Add Page Break Element to Tagged PDF | Document, ITaggedContent, StructureElement | Demonstrates how to insert a page‑break element into the logical structure tree of a tagged PDF u... |
| add-placeholder-textbox-form-field-tagged | Add Placeholder TextBox Form Field with Tagged Structure | Document, TextBoxField, Rectangle | Loads an existing PDF, inserts a TextBox form field with placeholder text, creates a /Form logica... |
| add-textbox-form-field-tagged-pdf | Add TextBox Form Field and Tag It for Accessibility | Document, Form, TextBoxField | Demonstrates how to create a TextBox form field, register it in the AcroForm, and associate it wi... |
| append-paragraph-actualtext-to-toci | Append Paragraph with ActualText to a TOCI Element | Document, ITaggedContent, StructureElement | Demonstrates how to create a TOCI (Table of Contents Item) element in a tagged PDF, add a paragra... |
| batch-convert-pdfs-to-tagged-pdfa | Batch Convert PDFs to Tagged PDF/A with Auto‑Tagging | Document, AutoTaggingSettings, PdfFormatConversionOptions | Demonstrates how to process a folder of untagged PDFs, enable Aspose.Pdf auto‑tagging, convert ea... |
| batch-pdfa1b-validation-xml-logs-dashboard | Batch PDF/A-1B Validation with XML Logs and Compliance Dashb... | Document, Validate, PdfFormat | The example loads all PDF files in a folder, validates each against the PDF/A‑1B standard using A... |
| batch-tag-pdfs-with-suffix | Batch Tag PDFs and Save with Suffix | Document, AutoTaggingSettings, ITaggedContent | Demonstrates how to process a folder of PDF files, enable automatic tagging, add missing structur... |
| batch-validate-pdfs-summary-csv | Batch Validate PDFs and Generate Summary CSV | Document, PdfFormat, Validate | Demonstrates how to iterate through a folder of PDF files, validate each against PDF/A‑1B using A... |
| check-pdf-ua-compliance-and-log | Check PDF/UA Compliance and Log Result | Document, IsPdfUaCompliant | Demonstrates loading a PDF with Aspose.Pdf, checking its PDF/UA accessibility compliance, and app... |
| create-nested-bullet-numbered-lists-tagged-pdf | Create Nested Bullet and Numbered Lists in a Tagged PDF | Document, Page, TextFragment | Demonstrates how to build a PDF containing a top‑level bullet list and a numbered list with a nes... |
| create-pdf-with-heading-and-language | Create PDF with Heading Element and Language Attribute | Document, ITaggedContent, SetLanguage | Demonstrates how to create a new PDF, enable tagged content, set the document language, add a lev... |
| create-tagged-3x4-table-in-pdf | Create Tagged 3x4 Table in PDF | Document, ITaggedContent, TableElement | Demonstrates 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-header | Create Tagged PDF Table with Merged Header Cells | Document, ITaggedContent, StructureElement | Demonstrates how to tag a PDF table, add a header row with merged cells, assign the TH role, and ... |
| create-tagged-pdf-with-toc | Create Tagged PDF with Table of Contents | Document, ITaggedContent, HeaderElement | Demonstrates how to generate a PDF, add tagged headings, configure a dedicated Table of Contents ... |
| create-tagged-table-with-custom-tags | Create Tagged Table with Custom DataType Tags and Validate P... | Document, ITaggedContent, StructureElement | The example loads a PDF, builds a tagged table structure, assigns custom data‑type tags to indivi... |
| custom-table-cell-borders-by-row-index | Custom Table Cell Borders by Row Index | Document, Page, Table | Shows how to create a PDF table with Aspose.Pdf and apply different background colors (as a visua... |
| enable-auto-tagging-save-tagged-pdf | Enable Automatic Tagging and Save PDF as Tagged PDF | Document, AutoTaggingSettings, ITaggedContent | Demonstrates how to activate Aspose.Pdf's auto‑tagging feature, set basic language and title meta... |
| export-pdf-structure-tree-to-json | Export PDF Structure Tree to JSON | Document, ITaggedContent, StructureElement | Shows how to load a PDF, read its tagged logical structure with Aspose.Pdf, convert the hierarchy... |
| export-structure-tree-to-xml-xsl-report | Export PDF Structure Tree to XML and Generate Report via XSL... | Document, Save, XmlSaveOptions | Loads a PDF with Aspose.Pdf, exports its logical structure tree to an XML file using XmlSaveOptio... |
| export-tagged-pdf-content-to-json | Export Tagged PDF Content to JSON | Document, ITaggedContent, StructureElement | Shows how to read a PDF's tagged structure with Aspose.Pdf, build a hierarchical representation, ... |
| extract-notes-from-tagged-pdf | Extract Notes from Tagged PDF to Text File | Document, ITaggedContent, StructureElement | Loads a PDF, accesses its tagged content, finds all NoteElement objects, concatenates their Actua... |
| extract-pdf-links-to-csv | Extract PDF Links to CSV | Document, Page, Annotation | Demonstrates how to load a PDF with Aspose.Pdf, iterate through its pages and link annotations, e... |
| extract-text-from-tagged-pdf-structure | Extract Text from Tagged PDF Structure Tree | Document, ITaggedContent, StructureElement | Demonstrates how to load a PDF, access its tagged content, and recursively traverse the logical s... |
| filter-xml-missing-alt-text | Filter XML Errors for Missing Alt Text | Shows 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.AttributeKeyAspose.Pdf.AttributeOwnerStandardAspose.Pdf.BorderInfoAspose.Pdf.BorderSideAspose.Pdf.ColorAspose.Pdf.DocumentAspose.Pdf.Document.SaveAspose.Pdf.Document.ValidateAspose.Pdf.FontRepositoryAspose.Pdf.FontStylesAspose.Pdf.HorizontalAlignmentAspose.Pdf.ITaggedContentAspose.Pdf.ITaggedContent.CreateArtElementAspose.Pdf.ITaggedContent.CreateDivElementAspose.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 -->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.

