Joget Workflow v6 Released

Check out the latest Joget Workflow v6 for many new features and improvements in user experience (UX), app maintainability and performance.

Skip to end of metadata
Go to start of metadata

Description

  • org.joget.apps.form.service.FormPdfUtil
  • Under wflow-core module
  • Utility class used to generate PDF file based on a form and its data

Code Sample

Methods

createPdf
public static byte[] createPdf(java.lang.String formId, java.lang.String primaryKey, org.joget.apps.app.model.AppDefinition appDef, org.joget.workflow.model.WorkflowAssignment assignment, java.lang.Boolean hideEmpty, java.lang.String header, java.lang.String footer, java.lang.String css, java.lang.Boolean showAllSelectOptions, java.lang.Boolean repeatHeader, java.lang.Boolean repeatFooter)

Create PDF file based on form

createPdf
public static byte[] createPdf(java.lang.String html, java.lang.String header, java.lang.String footer, java.lang.String css, java.lang.Boolean showAllSelectOptions, java.lang.Boolean repeatHeader, java.lang.Boolean repeatFooter)

Create PDF file based on Form HTML

formatHtml
public static java.lang.String formatHtml(java.lang.String html, java.lang.String header, java.lang.String footer, java.lang.String css, java.lang.Boolean showAllSelectOptions, java.lang.Boolean repeatHeader, java.lang.Boolean repeatFooter)

Prepare the HTML for PDF generation

getRenderer
public static org.xhtmlrenderer.pdf.ITextRenderer getRenderer()

Gets the renderer

getResourceURL
public static java.net.URL getResourceURL(java.lang.String resourceUrl)

Gets the full URL of a resource

getSelectedFormHtml
public static java.lang.String getSelectedFormHtml(java.lang.String formId, java.lang.String primaryKey, org.joget.apps.app.model.AppDefinition appDef, org.joget.workflow.model.WorkflowAssignment assignment, java.lang.Boolean hideEmpty)

Get the HTML of a form

removeEmptyValueChild
public static org.joget.apps.form.model.Element removeEmptyValueChild(Form form, org.joget.apps.form.model.Element element, org.joget.apps.form.model.FormData formData)

Removed the field elements which has empty value from the form

  • No labels