Class AttachmentManager

    • Method Detail

      • getAttachments

        public final List<String> getAttachments()
        A Collection of file attachment names (keys) contained within this PdfDocument.
        Returns:
        A list of attachments names
      • 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
      • removeAttachment

        public final void removeAttachment​(int index)
        Remove an attachment by attachment index
        Parameters:
        index - attachment index
      • getAttachmentData

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

        public final byte[] getAttachmentData​(int index)
        Gets attachment data from attachment index
        Parameters:
        index - Attachment index
        Returns:
        a attachment data