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
  • Hi, while we upgraded from 18.4 to 19.1, the PDF from HTLM stopped working. We recently deployed the upgraded plugin version (1.7.2), however this smart service still does not provide the required output. The process is stuck at the node and then errors out after some time. The only details we find in logs are "2019-07-01 13:02:14,509 [ajp-nio-8009-exec-2232] ERROR com.appiancorp.common.struts.BaseAction - Error executing action: Could not initialize class javax.swing.RepaintManager java.lang.NoClassDefFoundError: Could not initialize class javax.swing.RepaintManager "
    Can you help with this issue?

  • 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!

  • The plugin does not do anything special to handle fonts. It uses the Apache FOP classes to initiate the parsing and transformation. Please look at the class XmlFoConverter inside the plugin for more details. 

    I would suggest to do some research on how to handle fonts with Apache FOP transformation and either update the XSLT stylesheet or update the plugin code.

  • Hi, using PDF from XSL-FO Transformation gives us good resulting outputs but there is issue with fonts where the plugin does not react to font set inside XSLT (Georgia) and output is each time in Times font. Is there some solution / workaround? 

  • It appears that it was an issue with the plugin framework, not the plugin itself. Our engineering department released a hotfix to address this.

    Please create a support case to request the latest hotfix to be installed.

  • With recent migration to 19.1 we are also facing this issue. Ours is a cloud platform and this is failing at all the environments. The plugin version is v1.4.1. Please let me know if there is any update available for this plugin.

  • Hello, we are experiencing issues with this plugin in our Production environment only (unable to recreate in lower environments). 
    (http-0.0.0.0:8080-6) 2019-05-02 12:22:06,668 [http-0.0.0.0:8080-6] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=268446013, classname=com.appiancorp.ps.xmlfo.ss.PdfFromDocx3
    2019-05-02 12:22:06,690 INFO [stdout] (http-0.0.0.0:8080-6) com.appiancorp.suiteapi.process.exceptions.SmartServiceException: org.docx4j.openpackaging.exceptions.Docx4JException: Exception exporting package

  • Cloud vs On-premise?

    Dev/Test/Production?

    Version of the plugin?

  • Mike - could you please provide me more info about the environment?