PDF supports adding attachments (files of any kind, including other PDFs) to an
existing file. The cpdflib
library supports adding and removing
top-level attachments -- that is, ones which are associated with the
document as a whole rather than with an individual page.
To add an attachment, use AttachFile
. Multiple files can be attached by
multiple invocations of AttachFile
, and will appear in Acrobat's list
in the order added.
To remove all attached files, use RemoveAttachedFiles
: