PDF 2.0 Conformance Support
HotPDF can write and reload PDF 2.0 documents through the append-only pdf20 value in TPDFVersType
PDF/A-4 profiles
PDFACompliance | Profile | Generated identification |
|---|---|---|
'4' | PDF/A-4 base | part=4, rev=2020, no conformance field |
'4E' | PDF/A-4e engineering | part=4, rev=2020, conformance=E |
'4F' | PDF/A-4f associated files | part=4, rev=2020, conformance=F |
All three profiles force a PDF 2.0 header, require the normal PDF/A output intent and metadata checks, and prohibit encryption
AddPDFAssociatedFile accepts associated files under PDF/A-3, PDF/A-4e, and PDF/A-4f while AddPDFA3AssociatedFile remains available for source compatibility
PDF/A-4e enables the existing 3D and RichMedia annotation paths for engineering documents
PDF/UA-2 workflow
PDF.PDFUACompliance := True;
PDF.PDFUAPart := 2;
PDF.Lang := 'en-US';
PDF.BeginDoc;
Root := PDF.AddStructureElement('Document', nil);
PDF.AddStructureElementNS('WidgetGroup',
'https://example.com/ns/widgets', Root);
PDF.EndDoc;
Part 2 forces PDF 2.0 and emits pdfuaid:part=2 plus pdfuaid:rev=2024
RegisterStructureNamespace creates or reuses an indirect /Type /Namespace dictionary and lists it in StructTreeRoot /Namespaces
AddStructureElementNS attaches the registered dictionary through the structure element /NS entry and permits custom roles in that namespace
Validation at EndDoc
- The structure root must contain exactly one top-level
Documentelement - Every namespace dictionary must be indirect, typed as
Namespace, and carry a unique non-empty URI - Every structure-element
/NSreference must resolve to a dictionary listed by the root/Namespacesarray - An unnamespaced role must be a PDF 2.0 standard role or resolve through
RoleMap
PDF 2.0 structure roles
The typed enum adds DocumentFragment, Aside, Title, FENote, Sub, Em, Strong, and Artifact
The string overload additionally accepts the open-ended Hn form, including H7 and higher