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
Document list
items
List of documents to generate.
Save to DMS
saveToDms
Flag indicating whether the document should be saved to DMS (default value "true").
Save to DMS after abandoning the request
saveToDmsOnAbandon
Flag indicating whether the document should be saved to DMS after abandoning the request (default value "false").
Passing the document content in base64 String
fileContentInValue
Flag indicating whether the value of the component will pass the content of the generated file in the form of base64 String.
More information about component properties: Common component properties
List of documents to generate
The component configuration is added in the Source tab. Sample configurations:
<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>The sample configurations for documents to be generated are shown above. 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 TEMPLATE_NAME-VERSION format).
Document generation takes place according to the dependency graph flow — therefore remember to set the listening list appropriately.
If the component is located on the last page of the request, where there are also fields passed to the generated document, then the component must listen to something that changes on page exit. Examples:
Creating an Exit Service with a regular Echo Service (e.g. giving the value true) and assigning the result of the Echo Service to a variable that the document generator will then listen to.
Adding listening in GesDocumentGenerator to a predefined variable currentPageMid.
Illustration of the component

Last updated
Was this helpful?
