THPDFUA2RepairOptions Record
Per-repair switches, fallback content, and work limits for PDF/UA-2 structure tree repair
Declaration
THPDFUA2RepairOptions= record
NormalizeDuplicateNamespaces: boolean;
RegisterReferencedNamespaces: boolean;
RepairStandardStructureNamespaces: boolean;
RepairAttributeNamespaces: boolean;
RepairAttributeRevisions: boolean;
RepairListSemantics: boolean;
RepairTableSemantics: boolean;
RepairRubyWarichuSequences: boolean;
RepairPronunciationHints: boolean;
RepairMissingAlternateText: boolean;
RepairLanguageInheritance: boolean;
RepairHeadingOrder: boolean;
RepairArtifactTagging: boolean;
AllowDocumentFragmentHeadingStarts: boolean;
RollbackOnValidationFailure: boolean;
CustomAttributeNamespaceURI: AnsiString;
DefaultLanguage: AnsiString;
FallbackAlternateText: AnsiString;
MaxGeneratedAlternateTextCharacters: Integer;
MaxObjects: Integer;
MaxRepairs: Integer;
class function Default: THPDFUA2RepairOptions; static;
end;
Unit
HPDFDoc
Fields
| Field | Purpose |
|---|---|
NormalizeDuplicateNamespaces | Merge duplicate namespace entries in the structure tree namespaces |
RegisterReferencedNamespaces | Add a Namespace dictionary entry for every NS value referenced by structure elements |
RepairStandardStructureNamespaces | Fix malformed references to the PDF 2.0 standard structure namespace |
RepairAttributeNamespaces | Repair namespace wiring of structure attribute objects |
RepairAttributeRevisions | Normalize Revision values of attribute objects and revision-bearing elements |
RepairListSemantics | Rebuild List, ListNumber, and ListLabel structure for broken lists |
RepairTableSemantics | Rebuild Table, TR, TH, and TD hierarchies with proper scopes and spans |
RepairRubyWarichuSequences | Restore Ruby and Warichu child sequences to the required order |
RepairPronunciationHints | Repair phoneme pronunciation hints on structure elements |
RepairMissingAlternateText | Generate /Alt for figures and other elements that need it |
RepairLanguageInheritance | Fill missing /Lang entries down the structure hierarchy |
RepairHeadingOrder | Reassign heading levels so H1-H6 descend without gaps |
RepairArtifactTagging | Tag content marked as artifacts so it is excluded from the structure tree |
AllowDocumentFragmentHeadingStarts | Permit documents whose structure tree starts below H1, as document fragments do |
RollbackOnValidationFailure | Undo every applied repair when post-repair validation still fails |
CustomAttributeNamespaceURI | Optional URI used when rewriting custom attribute namespaces; empty by default |
DefaultLanguage | Language tag applied by language inheritance repair; empty skips the rewrite |
FallbackAlternateText | Text used when no better /Alt can be derived; empty leaves the element unresolved |
MaxGeneratedAlternateTextCharacters | Cap on characters generated for one /Alt value; the default is 4096 |
MaxObjects | Cap on objects examined; the default is 1000000 |
MaxRepairs | Cap on individual repairs applied per run; the default is 100000 |
Usage notes
- Start from
THPDFUA2RepairOptions.Default, which enables every repair switch plus rollback, then disable categories you do not want touched - Repair limits stop runaway runs on damaged documents; the report's
LimitExceededflag tells you when a cap was hit - With
RollbackOnValidationFailureenabled, a failed post-repair validation leaves the document byte-identical to its prior state