Class PdfService

java.lang.Object
formflow.library.pdf.PdfService

@Service public class PdfService extends Object
  • Constructor Details

    • PdfService

      public PdfService(PdfGenerator pdfGenerator)
      PdfService is a service that generates a byte[] of a flattened pdf.
  • Method Details

    • getFilledOutPDF

      public byte[] getFilledOutPDF(Submission submission) throws IOException
      Uses pdfGenerator to generate a pdf for a flow using a UUID.
      Parameters:
      submission - the submission for which the PDF should be generated
      Returns:
      a pdf byte array
      Throws:
      IOException
    • generatePdfName

      public String generatePdfName(Submission submission)
      Generates a generic pdf file name from the flow and submission id that are part of the Submission.
      Parameters:
      submission - Submission to create the PDF filename for
      Returns:
      a generic filename string, including the '.pdf' extension