|
THotPDF.AddStructureElement + PDF/UA accessibility attributes THotPDF tagged-PDF surface (v2.119.36 / v2.119.40 / v2.119.41)
|
AddXFAPacket AcroForm Support |
|
Adds a structure element to the document's StructTreeRoot for tagged-PDF / PDF/UA-1 (ISO 14289-1) accessibility workflows, including the Table 333 standard structure-type typed overload (v2.119.41), the
Delphi syntax: type THPDFStandardStructureType = ( sstDocument, sstPart, sstArt, sstSect, sstDiv, sstBlockQuote, sstCaption, sstTOC, sstTOCI, sstIndex, sstNonStruct, sstPrivate, sstH, sstH1, sstH2, sstH3, sstH4, sstH5, sstH6, sstP, sstL, sstLI, sstLbl, sstLBody, sstTable, sstTR, sstTH, sstTD, sstTHead, sstTBody, sstTFoot, sstSpan, sstQuote, sstNote, sstReference, sstBibEntry, sstCode, sstLink, sstAnnot, sstRuby, sstWarichu, sstFigure, sstFormula, sstForm); // PDF 1.7 §14.8.4 Table 333 standard types
// Typed overload (v2.119.41 - validates against Table 333) function AddStructureElement(StructureType: THPDFStandardStructureType; Parent: THPDFStructureElement): THPDFStructureElement; overload;
// String overload (free-form structure-type name + role map) function AddStructureElement(const StructureTypeName: AnsiString; Parent: THPDFStructureElement): THPDFStructureElement; overload;
// Structure-element attribute setters (v2.119.40) procedure SetStructureElementLang(Elem: THPDFStructureElement; const Lang: AnsiString); procedure SetStructureElementExpansion(Elem: THPDFStructureElement; const E: AnsiString); procedure SetStructureElementTitle(Elem: THPDFStructureElement; const T: AnsiString);
// Marked-content properties on BeginTaggedContent (v2.119.36) procedure BeginTaggedContent(const Tag: AnsiString; const Lang, Alt, ActualText, Expansion: AnsiString); overload;
Description Table 333 standard structure type enum (v2.119.41): instead of passing free-form strings (which require role-map entries to map non-standard names back to standard types), callers can pass a
Structure-element attribute setters (v2.119.40):
Marked-content properties on BeginTaggedContent (v2.119.36): the new overload accepts
Typical workflow (PDF/UA-1 tagged report)
PDF.PDFUACompliance := pdfuaPDFUA1; PDF.BeginDoc; Doc := PDF.AddStructureElement(sstDocument, nil); PDF.SetStructureElementLang(Doc, 'en-US'); H1 := PDF.AddStructureElement(sstH1, Doc); PDF.SetStructureElementTitle(H1, 'Chapter 1'); Fig := PDF.AddStructureElement(sstFigure, Doc); PDF.CurrentPage.BeginTaggedContent('Figure', 'en-US', 'Annual sales chart, Q1 4.2M, Q2 5.1M, Q3 5.8M, Q4 6.4M', // /Alt '', ''); PDF.CurrentPage.ShowImage(ChartImage, ...); PDF.CurrentPage.EndTaggedContent;
PDF/UA compliance gates When
See also: THPDFPage.BeginTaggedContent, THotPDF.AddXFAPacket, THotPDF.RegisterAcroFormFont |