wordDocGenerator Step

Last published at: May 2nd, 2023

Description:

Generate documents as Word or PDF using word templates. These word templates may contain reporting commands specified by the Aspose reporting engine: https://docs.aspose.com/display/wordsnet/Template+Syntax
https://docs.aspose.com/display/wordsnet/Appendix+A.+Enumeration+Extension+Methods

Inputs

  • chooseReportTemplate – Choose the desired Report Template
  • configureDataSources – Configure the Data Source
  • docPhysicalPath – specifies the .docx Physical File Path for the output
  • pdfPhysicalPath - specifies the .pdf Physical File Path for the output
  • docVirtualPath- - specifies the .docx Virtual File Path for the output 
  • pdfVirtualPath- - specifies the .pdf Virtual File Path for the output 
  • fileName - PDF / DOC file name for the output

Returns

  • True – step executed successfully
  • False – step failed to execute 
Delete

Note

This widget can identify the line breaks and manual space (as indentation) from a Text Area widget to generate document 

Usage:

Example:

Let’s build and execute the wordDocGeneratorDef example.          

  • Create a new definition called “wordDocGeneratorDef
  • Select the definition and click the “design” button
  • Drag a wordDocGenerator step to the canvas
  • Connect the dots between the start and wordDocGenerator step 

  • Click on the “wordDocGenerator” step to configure its properties
  • Configure the following values for the properties as shown on the below graphic
  • Click on the icon to choose the report template for upload. Any previous template shall be replaced by the uploaded file. Click on the template file name to download the file. Click on Remove Template to permanently remove the existing template from the document path on the server. 

  • Navigate to Advanced tab to configure the data source. The connection string, SQL Query and the datasource name are input as shown below. The result of the SQL query can be accessed through the data source using Aspose syntax. 

  • The report template format is shown as below.

  • Confirm the changes. Save the process definition, create a process instance and execute. The step should generate the Word document / PDF file and update the physical and virtual file path of variables or globals. 
  • The generated PDF file is saved by the file name as configured above. The content for the example used is as shown below.

 

Powerful Document Generation (...)