Add Attachment to PDF

[ ]

To add an attachment to a PDF document:

  1. Create a FileSpecification object that contains the file you want to attach, and file description.
  2. Add the FileSpecification object to a Document object’s EmbeddedFiles collection using the add(..) method. The EmbeddedFiles collection contains all the attachments added to a PDF file.

The following code snippet shows how to add an attachment to a PDF document.