GroupDocsGists
10/24/2017 - 1:02 PM

AddAttachmentPDF.cs

using (PdfDocument doc = Document.Load<PdfDocument>(Utilities.MapSourceFilePath(FilePath)))
{
    // Add the attachment
    doc.Attachments.Add(File.ReadAllBytes(Utilities.MapSourceFilePath(AttachmentPath)), "sample", "sample doc as attachment");

    // Save changes
    doc.Save();

}