Search Results for

    Show / Hide Table of Contents

    Class PdfAttachmentCollection

    Collection of attachments contained within a pdf document

    Inheritance
    System.Object
    PdfClientAccessor
    PdfAttachmentCollection
    Implements
    System.Collections.Generic.IEnumerable<PdfAttachment>
    System.Collections.IEnumerable
    Namespace: IronPdf
    Assembly: IronPdf.dll
    Syntax
    public class PdfAttachmentCollection : PdfClientAccessor, IEnumerable<PdfAttachment>, IEnumerable

    Properties

    Item[Int32]

    Retrieve the attachment located at the specified index within this collection

    Declaration
    public PdfAttachment this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index

    Index

    Property Value
    Type Description
    PdfAttachment

    Pdf attachment

    Methods

    AddAttachment(String, Byte[])

    Add an attachment to the pdf document using the specified name and data

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

    Attachment name

    System.Byte[] data

    Attachment data

    Returns
    Type Description
    PdfAttachment

    Pdf attachment

    GetEnumerator()

    Retrieve enumerator

    Declaration
    public IEnumerator<PdfAttachment> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<PdfAttachment>

    Enumerator

    RemoveAttachment(PdfAttachment)

    Remove the specified attachment from the pdf document

    Declaration
    public void RemoveAttachment(PdfAttachment attachment)
    Parameters
    Type Name Description
    PdfAttachment attachment

    Attachment to remove

    Implements

    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    Want to deploy IronPDF to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronPDF free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.