Xamarin.iOS

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfAttachment

    Show / Hide Table of Contents

    Class PdfAttachment

    Represents the attachments of the PDF document.

    Inheritance
    System.Object
    PdfFileSpecificationBase
    PdfEmbeddedFileSpecification
    PdfAttachment
    Inherited Members
    PdfEmbeddedFileSpecification.Initialize()
    PdfEmbeddedFileSpecification.Save()
    PdfEmbeddedFileSpecification.FileName
    PdfEmbeddedFileSpecification.Data
    PdfEmbeddedFileSpecification.Description
    PdfEmbeddedFileSpecification.MimeType
    PdfEmbeddedFileSpecification.CreationDate
    PdfEmbeddedFileSpecification.ModificationDate
    PdfEmbeddedFileSpecification.PortfolioAttributes
    PdfEmbeddedFileSpecification.Relationship
    PdfFileSpecificationBase.FormatFileName(String, Boolean)
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public class PdfAttachment : PdfEmbeddedFileSpecification, IPdfWrapper
    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[])

    Declaration
    public PdfAttachment(string fileName, byte[] data)
    Parameters
    Type Name Description
    System.String fileName

    The name of the file to be attached.

    System.Byte[] data

    The data to be attached as a file.

    PdfAttachment(String, Stream)

    Declaration
    public PdfAttachment(string fileName, Stream stream)
    Parameters
    Type Name Description
    System.String fileName

    The name of the file to be attached.

    System.IO.Stream stream

    The stream to be attached.

    See Also

    PdfDocument
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved