Class AttachmentManager
java.lang.Object
com.ironsoftware.ironpdf.attachment.AttachmentManager
Class used to edit attachment to a
PdfDocument
.
-
Constructor Summary
ConstructorDescriptionAttachmentManager
(InternalPdfDocument internalPdfDocument) Please get AttachmentManager byPdfDocument.getAttachment()
instead. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addAttachment
(String name, byte[] attachmentData) Add a new attachment.final byte[]
getAttachmentData
(String name) Gets attachment data from attachment nameA Collection of file attachment names (keys) contained within this PdfDocument.final void
removeAttachment
(String name) Remove an attachment by attachment name
-
Constructor Details
-
AttachmentManager
Please get AttachmentManager byPdfDocument.getAttachment()
instead.- Parameters:
internalPdfDocument
- the internal pdf document
-
-
Method Details
-
getAttachments
A Collection of file attachment names (keys) contained within this PdfDocument.- Returns:
- A list of attachments names
-
addAttachment
Add a new attachment.- Parameters:
name
- attachment nameattachmentData
- attachment data
-
removeAttachment
Remove an attachment by attachment name- Parameters:
name
- attachment name
-
getAttachmentData
Gets attachment data from attachment name- Parameters:
name
- Attachment name- Returns:
- a attachment data
-