Dynamic Document Generator

Overview

This version is for Appian 23.2 and above. Cloud customers on a lower version of Appian that want to install this plugin should open a support case. Self-managed customers can find the latest jar for Appian 23.1 and lower version in the folder pre-23.2

Convert, merge and generate DOCX, PDF and XML files automatically in an Appian process

Key Features & Functionality

  • PDF from single DOCX with Fonts
    • Convert multiple DOCX files into a single PDF. Please note that the translation from DOCX to PDF is not always 1:1. The template may need to be tweaked or simplified to achieve the desired results.
  • PDF from DOCX without Fonts
    • Convert multiple DOCX files into a single PDF. Please note that the translation from DOCX to PDF is not always 1:1. The template may need to be tweaked or simplified to achieve the desired results. This will not support fonts.
  • PDF from XSL-FO Transformation
    • Uses XSLT to convert an XML to XSL-FO which is then converted to PDF
  • PDF from HTML
    • Converts an HTML document into a single page PDF.
  • PDF from HTML Transformation
    • Uses XSLT to convert an XML to HTML which is then converted to PDF
  • Text Doc from XSLT
    • Uses XSLT to convert an XML to a plain text document (such as HTML, another XML doc, etc).
  • DOCX from XHTML With Styling
    • Converts a valid XHTML file into a DOCX, allowing you to provide your own template file for style reference. Useful for creating dynamic documents that are editable
  • DOCX Merge
    • Merges one or more DOCX files together. If a header or footer exists in any document, they will be removed during the merge process.
    • A configurable separator can be specified: none, line break or page break

Function: xsltransform - Transform source XML using XSL Transform

Anonymous
Parents
  • For anyone using DOCX from XHTML a few useful notes for you: 

    • To access MS Word standard styles (like Title, Heading1, Normal, etc.) format your HTML body as so
      • Title Example: <p class="Title">Your Title Here</p>
      • Heading1 Example: <p class="Heading1">Heading Text</p>
      • Basically the point being is that you should us <p> tags for all of your text and specify the formatting class as the class
        • This will allow MS Word to register the style for the navigation pane
    • It's worth noting that although MS Word identifies the style applied to text, it will not use the default style of MS Word (this tripped me up for a while)
      • You should create a document in word with some styles applied and save as an HTML and grab the relevant CSS style definitions out of the CSS and put it in a constant or something that you add to the <head> of your HTML by default
      • Make sure that you set your CSS class names to p.<msWordStyle> (eg: p.Title, p.Heading1, etc.)
        • This will allow your class to both be recognized by MS Word and will allow you to apply a style to the text so that it looks decent on openning the document
      • It's also worth noting that the CSS created by MS Word has non-standard tags in it generally of the format "mso-style..."
        • You can remove these as they won't do anything for you and will just take up space
    • Also remember the main difference between XHTML and HTML is that all attributes must have "" around them!!!

    Happy document generation everyone!

  • Hi Ilan,

    Would like to mention that we have encountered the below error while re-deploying the plugin to version 1.7.5 in one of the environments.

    We had saved XSLParameter CDT initially. Then to upgrade the plugin, i tried to redeploy the same but got the error as mentioned below.

    Hence, have deleted the CDT from Appian Designer and tried to redeploy the plugin. It seems like the old version of CDT still exists in the environment and is not allowing to deploy the plugin.

    Please let us know if you have the resolution.

    2019-12-01 15:22:01,697 [ajp-nio-8009-exec-4] INFO  com.appiancorp.plugins.AppianPluginManager - Updating plugin 'DynamicDocumentGen:1.7.5 There was a problem loading the module descriptor: TextDocFromXslt.<br/>com.appiancorp.suiteapi.type.exceptions.InvalidTypeException: com.appiancorp.suiteapi.common.exceptions.AppianException: Invalid Type: Unsupported type [Lcom.appiancorp.ps.xmlfo.types.XslParameter; (APNX-1-4047-000)' to 'DynamicDocumentGen'
    2019-12-01 15:22:01,902 [ajp-nio-8009-exec-4] ERROR com.appiancorp.type.config.plugin.PojoDatatypesConfig - The data type [uuid={urn:appian:ps:dynamicdocgen}XslParameter] in plug-in [key=DynamicDocumentGen, module=XslParameter] was not imported because it or another data type in the plug-in module was already present on the system with a different structure, and the version number of this plug-in is not greater than the deployed plug-in that last updated this data type. You must increment the plug-in version number in the appian-plugin.xml file and deploy this plug-in again. If the problem persists after incrementing the version number, check that all data type precedents of the data type are declared in the same plug-in module or are listed before this data type in the appian-plug.xml. (APNX-1-4165-004)
    2019-12-01 15:22:01,922 [ajp-nio-8009-exec-4] INFO  com.appiancorp.process.admin.LoadACSchemas - Attempted to skip registration of [com.appiancorp.ps.xmlfo.ss.PdfFromDocx3] as it is current [1.7.5], but the ActivityClassSchema was not registered, so re-registering
    2019-12-01 15:22:01,958 [ajp-nio-8009-exec-4] INFO  com.appiancorp.process.admin.LoadACSchemas - Attempted to skip registration of [com.appiancorp.ps.xmlfo.ss.DocxFromXhtmlWithStyling] as it is current [1.7.5], but the ActivityClassSchema was not registered, so re-registering
    2019-12-01 15:22:01,987 [ajp-nio-8009-exec-4] INFO  com.appiancorp.process.admin.LoadACSchemas - Attempted to skip registration of [com.appiancorp.ps.xmlfo.ss.DocxMergeWithSeparator] as it is current [1.7.5], but the ActivityClassSchema was not registered, so re-registering
    2019-12-01 15:22:02,016 [ajp-nio-8009-exec-4] ERROR com.atlassian.plugin.manager.DefaultPluginManager - There was an error loading the descriptor 'TextDocFromXslt' of plugin 'DynamicDocumentGen'. Disabling.
    com.atlassian.plugin.PluginException: com.appiancorp.suiteapi.type.exceptions.InvalidTypeException: com.appiancorp.suiteapi.common.exceptions.AppianException: Invalid Type: Unsupported type [Lcom.appiancorp.ps.xmlfo.types.XslParameter; (APNX-1-4047-000)
Comment
  • Hi Ilan,

    Would like to mention that we have encountered the below error while re-deploying the plugin to version 1.7.5 in one of the environments.

    We had saved XSLParameter CDT initially. Then to upgrade the plugin, i tried to redeploy the same but got the error as mentioned below.

    Hence, have deleted the CDT from Appian Designer and tried to redeploy the plugin. It seems like the old version of CDT still exists in the environment and is not allowing to deploy the plugin.

    Please let us know if you have the resolution.

    2019-12-01 15:22:01,697 [ajp-nio-8009-exec-4] INFO  com.appiancorp.plugins.AppianPluginManager - Updating plugin 'DynamicDocumentGen:1.7.5 There was a problem loading the module descriptor: TextDocFromXslt.<br/>com.appiancorp.suiteapi.type.exceptions.InvalidTypeException: com.appiancorp.suiteapi.common.exceptions.AppianException: Invalid Type: Unsupported type [Lcom.appiancorp.ps.xmlfo.types.XslParameter; (APNX-1-4047-000)' to 'DynamicDocumentGen'
    2019-12-01 15:22:01,902 [ajp-nio-8009-exec-4] ERROR com.appiancorp.type.config.plugin.PojoDatatypesConfig - The data type [uuid={urn:appian:ps:dynamicdocgen}XslParameter] in plug-in [key=DynamicDocumentGen, module=XslParameter] was not imported because it or another data type in the plug-in module was already present on the system with a different structure, and the version number of this plug-in is not greater than the deployed plug-in that last updated this data type. You must increment the plug-in version number in the appian-plugin.xml file and deploy this plug-in again. If the problem persists after incrementing the version number, check that all data type precedents of the data type are declared in the same plug-in module or are listed before this data type in the appian-plug.xml. (APNX-1-4165-004)
    2019-12-01 15:22:01,922 [ajp-nio-8009-exec-4] INFO  com.appiancorp.process.admin.LoadACSchemas - Attempted to skip registration of [com.appiancorp.ps.xmlfo.ss.PdfFromDocx3] as it is current [1.7.5], but the ActivityClassSchema was not registered, so re-registering
    2019-12-01 15:22:01,958 [ajp-nio-8009-exec-4] INFO  com.appiancorp.process.admin.LoadACSchemas - Attempted to skip registration of [com.appiancorp.ps.xmlfo.ss.DocxFromXhtmlWithStyling] as it is current [1.7.5], but the ActivityClassSchema was not registered, so re-registering
    2019-12-01 15:22:01,987 [ajp-nio-8009-exec-4] INFO  com.appiancorp.process.admin.LoadACSchemas - Attempted to skip registration of [com.appiancorp.ps.xmlfo.ss.DocxMergeWithSeparator] as it is current [1.7.5], but the ActivityClassSchema was not registered, so re-registering
    2019-12-01 15:22:02,016 [ajp-nio-8009-exec-4] ERROR com.atlassian.plugin.manager.DefaultPluginManager - There was an error loading the descriptor 'TextDocFromXslt' of plugin 'DynamicDocumentGen'. Disabling.
    com.atlassian.plugin.PluginException: com.appiancorp.suiteapi.type.exceptions.InvalidTypeException: com.appiancorp.suiteapi.common.exceptions.AppianException: Invalid Type: Unsupported type [Lcom.appiancorp.ps.xmlfo.types.XslParameter; (APNX-1-4047-000)
Children
No Data