Class AttachmentManager

java.lang.Object
com.ironsoftware.ironpdf.attachment.AttachmentManager

public class AttachmentManager extends Object
Class used to edit attachment to a PdfDocument.

See: PdfDocument.getAttachment()

  • Constructor Details

  • Method Details

    • getAttachments

      public final List<String> getAttachments()
      A Collection of file attachment names (keys) contained within this PdfDocument.
    • addAttachment

      public final void addAttachment(String name, byte[] attachmentData)
      Add a new attachment.
      Parameters:
      name - attachment name
      attachmentData - attachment data
    • removeAttachment

      public final void removeAttachment(String name)
      Remove an attachment by attachment name
      Parameters:
      name - attachment name
    • getAttachmentData

      public final byte[] getAttachmentData(String name)
      Gets attachment data from attachment name
      Parameters:
      name - Attachment name