function AttachmentRelationshipFeaturesAvailable: Boolean;
BooleanAttachmentRelationshipFeaturesAvailable loads the selected PDFium module when needed and returns True if the optional FPDFAttachment_GetAFRelationship entry point is present among the module's exports
With the export available, AttachmentRelationship, the Relationship field of the TPdfAttachmentMetadata record returned by ReadAttachmentMetadata and the Relationship field filled by TryGetAnnotationFileAttachment all report the /AFRelationship name of the file specification (ISO 32000-2 Table 43)
Should the export be missing, those values come back as an empty string, precisely as they do for a file specification that carries no /AFRelationship entry
Source, Data, Alternative, Supplement, EncryptedPayload, FormData, Template, Unspecified), so associated files it writes read back through the native APIif AttachmentRelationshipFeaturesAvailable and (Pdf.AttachmentRelationship[0] = 'Source') then
ShowMessage('First attachment is the source document');