License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

  • 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

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

import org.joget.apps.app.model.AppDefinition;
import org.joget.apps.app.service.AppUtil;
import org.joget.apps.form.service.FormPdfUtil;
 
AppDefinition appDef = AppUtil.getCurrentAppDefinition();
String formId = "crm_account";
String id = "0001";
 
//generate the pdf file in bytes
byte[] pdf = FormPdfUtil.createPdf(formId, id, appDef, null, null, null, null, null, null, null, null);

Methods

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

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

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

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

Info

The current Joget formPdfUtil - createPdf() method only supports a limited set of font families: 
"Times", 
"STSong-Light", 
"STSong-Light", 
"MSung-Light", 
"MSung-Light", 
"HeiseiMin-W3", 
"HeiseiMin-W3", 
"HYGoThic-Medium", 
"HYGoThic-Medium", 
"Noto Naskh Arabic", 
"DroidSans", 
"THSarabun".

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

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

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

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

Gets the renderer

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

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

Gets the full URL of a resource

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

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

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

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

License Error

The license of the app Translations for Confluence (formerly Language Macros) has expired. Please renew the license.

  • No labels