// For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
using (PdfDocument doc = Document.Load<PdfDocument>(Utilities.MapSourceFilePath(FilePath)))
{
foreach (PdfAttachment attachment in doc.Attachments)
{
Console.WriteLine("Name: {0}", attachment.Name);
Console.WriteLine("Description: {0}", attachment.Description);
Console.WriteLine("File format: {0}", attachment.DocumentInfo.FileFormat);
// Save the attached file on disk
File.WriteAllBytes(Path.Combine(Utilities.MapSourceFilePath(AttachmentPath), attachment.Name), attachment.Content);
}
}