Class Attachment_Api


  • public final class Attachment_Api
    extends Object
    The type Attachment api.
    • Constructor Detail

      • Attachment_Api

        public Attachment_Api()
    • Method Detail

      • getPdfAttachmentCollection

        public static List<String> getPdfAttachmentCollection​(InternalPdfDocument internalPdfDocument)
        Gets collection of attachments contained within a pdf document
        Parameters:
        internalPdfDocument - the internal pdf document
        Returns:
        the pdf attachment collection
      • getPdfAttachmentData

        public static byte[] getPdfAttachmentData​(InternalPdfDocument internalPdfDocument,
                                                  String name)
        Gets attachment data from attachment name
        Parameters:
        internalPdfDocument - the internal pdf document
        name - Attachment name
        Returns:
        the byte [ ]
      • getPdfAttachmentData

        public static byte[] getPdfAttachmentData​(InternalPdfDocument internalPdfDocument,
                                                  int index)
        Gets attachment data from attachment index
        Parameters:
        internalPdfDocument - the internal pdf document
        index - Attachment index
        Returns:
        the byte [ ]
      • addPdfAttachment

        public static void addPdfAttachment​(InternalPdfDocument internalPdfDocument,
                                            String name,
                                            byte[] attachmentBytes)
        Add a new attachment
        Parameters:
        internalPdfDocument - the internal pdf document
        name - Attachment name
        attachmentBytes - Attachment data
      • removePdfAttachment

        public static void removePdfAttachment​(InternalPdfDocument internalPdfDocument,
                                               String name)
        Remove attachment by attachment name
        Parameters:
        internalPdfDocument - the internal pdf document
        name - Attachment name
      • removePdfAttachment

        public static void removePdfAttachment​(InternalPdfDocument internalPdfDocument,
                                               int index)
        Remove attachment by attachment index
        Parameters:
        internalPdfDocument - the internal pdf document
        index - Attachment index