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
Function: xsltransform - Transform source XML using XSL Transform
Would someone please help here?I get the following error while using DOCX from XHTML:bundleName for SmartServiceException, builder.smartServiceClass=class com.appiancorp.ps.xmlfo.ss.AbstractDocumentGeneration Appian Version: 19.4
Apppian Versin: 19.1Plugin Version: v1.7.5Smart Service: PDF from HTML
Getting a java.lang.Exception: java.lang.NullPointerException error when trying to run the smart service. I am passing a sample html document stored in the Appian KC. Mapped this document to a variable and passed the variable to the smart service inputs. I have not mapped an input to the "Existing Document" parameter as i am hoping a new pdf document will be generated.
Can anyone advise what the issue is?
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)
I am using the PDF from Docx smart service included in this plugin. One of the inputs is "P D F Options". I cannot find any documentation or comments explaining how the Options are configured. Does anyone have more information on this?
DOCX from dynamic template seems to be turning single spaces into double spaces randomly. Any advice on how to fix this. Our template is very simple.
Hey Illan, your post was probably the most helpful among anything else I found on the web. So thanks for that! I do have one question though: Do you know a way to insert a page break into docx so that the first element on the new page is a Heading1 element? The problems I've encountered so far is that if I wrap a page break around <p> tags, the first line of the new page is empty. And if I put in multiple classes inside a <p> tag, only the first class renders. Let me know if you know of any workarounds!
Sorry - Community apparently doesn't auto-notify about replies here, so I never saw your followup questions
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:
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.