Attach
attach embeds a file in the PDF, one file per stage.
remediate with profile: "Factur-X" embeds it as the standard requires.
List
PDF.attachments() lists the embedded files, with their media type and relationship when the PDF states them:
Detach
detach removes an embedded file by the name the PDF lists it under. A name it doesn’t list is refused with a 400.
Extract
PDF.extractAttachments() returns the embedded files: all of them, or one by name. As the last stage of a list, extract-attachments returns them in a ZIP next to the PDF.