Document generator - DocumentGenerator

The component is used to generate documents (PDF) based on XSL-FO templates. It also allows saving generated documents to the DMS system, as well as passing their content as a base64 encoded string.

Component properties

Eximee Designer property
Attribute name in Source
Description

List of documents

items

List of documents to be generated.

Save to DMS

saveToDms

Flag indicating whether the document should be saved to the DMS (default value "true").

Save to DMS on abandon

saveToDmsOnAbandon

Flag indicating whether the document should be saved to the DMS when the application is abandoned (default value "false").

Passing document content in base64 String

fileContentInValue

Flag indicating whether the generated file content will be passed in the component's value as base64 String.

More information about component properties: Common component properties

List of documents to be generated

We add the component configuration in the Source. Example configurations:

Example 1 - Configuration when data comes from form fields
<p1:GesDocumentGenerator id="GesDocumentGenerator1" inheritLayout="true">
  <p1:GesDocumentGenerator.layoutData>
    <GridData horizontalAlignment="FILL" horizontalSpan="16"/>
  </p1:GesDocumentGenerator.layoutData>
  <data:DocumentGeneratorItems>
    <data:DocumentGeneratorItem generatorName="fop" fileName="my_file.pdf" documentTemplate="my_temp.xsl-*"/>
  </data:DocumentGeneratorItems>
</p1:GesDocumentGenerator>
Example 2 - Configuration when data comes from the xmlDocument variable
<p1:GesDocumentGenerator id="GesDocumentGenerator1" inheritLayout="false">
  <data:ListeningOn>
    <data:ListenField id="xmlDocument"/>
  </data:ListeningOn>
  <data:ClearOn/>
  <p1:GesDocumentGenerator.layoutData>
    <ns6:GridData horizontalAlignment="LEFT" horizontalSpan="6" verticalAlignment="CENTER"/>
  </p1:GesDocumentGenerator.layoutData>
  <data:DocumentGeneratorItems>
    <data:DocumentGeneratorItem generatorName="fopFromVariable" fileName="my_file.pdf" documentTemplate="my_template.xsl-*"/>
  </data:DocumentGeneratorItems>
</p1:GesDocumentGenerator>

The above shows example configurations of documents to be generated. The parameter generatorName specifies the name of the document generator to be used to generate the document, in the next parameter we specify the file name (fileName), which will be presented to the user, and the last one the name of the document template available in the repository (documentTemplate in the format TEMPLATE_NAME-VERSION).

Component illustration

Illustration 1. Example appearance of the component on the form

Demo application: demoDocuments

Last updated

Was this helpful?