Class PDFUtils


  • public class PDFUtils
    extends Object
    A utility class for assisting with the manipulation of flat PDF files.
    Since:
    4.1.0
    • Constructor Detail

      • PDFUtils

        public PDFUtils()
    • Method Detail

      • mergePDF

        public static byte[] mergePDF​(List<byte[]> pdfList)
                               throws IOException
        Tasks a List of PDF documents and appends them together page by page. The resulting merge document is returned
        Parameters:
        pdfList - a a List of PDF documents byte[]
        Returns:
        the merged document
        Throws:
        IOException - an IO error occurs
      • mergeReceiptPDF

        public static byte[] mergeReceiptPDF​(List<Submission> submissions)
                                      throws IOException
        This takes a List of submissions, it returns a byte[] containing the receipts appended together page by page
        Parameters:
        submissions - the List containing the generated pdf to merge.
        Returns:
        a byte[] containing the receipts appended together page by page
        Throws:
        IOException - an IO error occurs