Advanced Document Templating

Overview

This plugins allows to generate DOCX files from a DOCX template and an XML data model from Appian. It also allows to convert a DOCX into PDF through an opensource (with limited capabilities) library.

Key Features & Functionality

  • Smart Service to Generate a DOCX from a DOCX Template and an XML data model
  • Smart Service to convert DOCX to PDF through an opensource (with limited capabilities) library
Anonymous
  • I'd recommend not using this smart service, but instead using https://community.appian.com/b/appmarket/posts/dynamic-document-generator

    to do conversion of docx > pdf.  I don't believe this smart service is being actively updated.

    As for what those options are doing, I looked in the code and I don't actually see them used at all.

  • Will documentation ever be added for any of the additional functionality, particularly the PDF from DOCX smart service included in this plug-in?  The node has an option called "P D F Options" which accepts [any type], and there are no instructions for using it.

  • We plan to use this plugin and saw your comment about version upgrade,   do you still have issue with new version ?

  • Hi - I've add the documentation back to the download package

  • The documentation doesn't exits in the file

  • My experience with this plugin in version upgrade was troublesome. The same template used in the previous version of plugin i.e AdvancedDocumentTemplating (v1.0.4), undergone some series of changes in the implementation level of Template, before the Template was working fine with the ### fields without any spaces in between two ### characters, later when the upgrade happened to AdvancedDocumentTemplating (v1.0.6) the plugin failed to differentiate ### fields without spaces.This should contain space between the set of ### characters for a template to be generated without any issues.

  • Lessons Learned (in case it helps):

    • Start with a clean template and build from there, the XML can be severely distorted on templates given to you by clients
    • When adding text where you want to put your tokens, use single abbreviation letters (e.g. "a", "b", "c"). DocX has a tendency to split your tokens up.
    • Simply opening a template can modify the backend XML and split up your tokens (e.g. from "${d.action}" to "<t>${</t><t>d.action}</t>"). This will make it so Appian can't find the token. You can get around this by keeping a local copy of the document.xml and modifying that directly with Notepad++
    • Start with the difficult "lists" first, single elements don't fail often. Do one list at a time to make sure you have it right before moving onto the next list. 
    • Make sure all of your formatting and your column widths for tables are set before you even move to document.xml update. I was not able to modify column widths after the fact without breaking things severely. 
    • Get familiar with XML tags, you'll need to recognize your paragraphs, rows, columns, and instructional text.
    • The "<<" & ">>" gave me parsing errors; removing these often solved these issues.
    • You MUST give the plugin a document, even if it's a blank one
    • Tokens are case sensitive, so make sure everything matches
    • Resizing images makes images quite small (think from full page size, to a thumbnail)
    • For designers new to docX development, you can access the "document.xml" by changing your docX to a zip, opening it, removing the document.xml, modifying it, placing it back into the zip, saving, and modifying the zip back to a docX.
    • Make sure to save your errors out of the smart service, sometimes they are worth looking at, other times not so much. There is definitely no sense to the "column number" they give you.
  • Here is a conversation that could help someone using the plugin

    I'm trying to use "DocX from Dynamic Template" smart service.Here, I am trying to execute the below condition in template. [#if doc.project.condition = 1] true [#else] false [/#if] But i'm getting…
    By in Discussions > Plug-Ins
    6 replies