Adding file attachments to PDF files is often a useful feature. Attachments can contain any kind of file, including spreadsheets with detailed information that would clutter the main document, multimedia files with movies and sound, sample code, and so on.
Adding file attachments to your PDF for UWP documents is easy. All you have to do is call the C1PdfDocument.AddAttachment method and specify which file you want to attach, what area of the page should contain the attachment, and optionally, the appearance of the attachment.
For example, the following code attaches all files in the application directory to the PDF document:
Here's what the PDF document looks like in Adobe's Acrobat Reader:
The attachments are displayed as icons (you can select from four predefined icons in the AttachmentIconEnum enumeration and you can also select the icon color). When the user moves the mouse over the attachment, the file name is displayed and the cursor changes to indicate there is an attachment available. The user can then right-click the attachment name to open the attachment or save it.