This sample shows how to save PDF attachment bytes using Docotic.Pdf library.
Each attachment is represented by a PdfFileSpecification object. Use PdfFileSpecification.Contents property to retrieve a reference to a PdfEmbeddedFile object.
If the retrieved reference is null then the file specification refers to an external file. I.e., only reference to a file is attached.
If the retrieved reference is non-null then the file is actually embedded in the document. Use PdfEmbeddedFile.Save methods to extract contents of the attachment to a stream or a file.