Class PdfAttachment
- Namespace
- Syncfusion.Pdf.Interactive
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents the attachments of the PDF document.
public class PdfAttachment : PdfEmbeddedFileSpecification
- Inheritance
-
PdfAttachment
- Inherited Members
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create an attachment.
PdfAttachment attachment = new PdfAttachment("Input.txt");
attachment.Description = "Input.txt";
attachment.MimeType = "application/txt";
//Add the attachment to the document.
document.Attachments.Add(attachment);
//Save and close the PDF document.
document.Save("Output.pdf");
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create an attachment.
Dim attachment As New PdfAttachment("Input.txt")
attachment.Description = "Input.txt"
attachment.MimeType = "application/txt"
'Add the attachment to the document.
document.Attachments.Add(attachment)
'Save and close the PDF document.
document.Save("Output.pdf")
document.Close(True)
Constructors
PdfAttachment(string, byte[])
public PdfAttachment(string fileName, byte[] data)
Parameters
- See Also
PdfAttachment(string, Stream)
public PdfAttachment(string fileName, Stream stream)
Parameters
- See Also