Class PdfAttachmentCollection
Collection of attachments contained within a pdf document
Namespace: IronPdf
Assembly: IronPdf.dll
Syntax
public class PdfAttachmentCollection : PdfClientAccessor
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