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
  • We are using this plug in and the PDF from HTML smart service and started receiving errors yesterday and today.  It has been working for at least a month and just started failing in all environments today.  Here is a section of our tomcar-stdOut.log. It does appear that  it is a timeout issue, there are 2 in about 100 that do get converted.

    2021-07-26 16:19:32,413 [Appian Work Item - 40851 - execution09 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ps.xmlfo.ss.PdfFromHtml - The PDF generation took longer than 10 seconds
    INTERRUPTED while loading Image
    2021-07-26 16:19:33,214 [Appian Work Item - 40851 - execution09 : UnattendedJavaActivityRequest] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=-1878946949, classname=com.appiancorp.ps.xmlfo.ss.PdfFromHtml
    com.appiancorp.suiteapi.process.exceptions.SmartServiceException: java.lang.Exception: Error while generating the PDF file. The PDF file will not be available.
    	at com.appiancorp.suiteapi.process.exceptions.SmartServiceException$Builder.build(SmartServiceException.java:145)
    	at com.appiancorp.ps.xmlfo.ss.AbstractDocumentGeneration.run(AbstractDocumentGeneration.java:57)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131)
    	at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125)
    	at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:27)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:88)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequestResponseCreator.getJavaActivityResultResponse(UnattendedJavaActivityRequestResponseCreator.java:21)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.getJavaActivityResultResponse(UnattendedJavaActivityRequest.java:67)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
    	at com.appiancorp.common.persistence.data.AppianDataUserContextProvider.executeWithConsistentDataReads(AppianDataUserContextProvider.java:116)
    	at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter(ProcessContinuationRequest.java:68)
    	at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:102)
    	at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
    	at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:93)
    	at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.Exception: Error while generating the PDF file. The PDF file will not be available.
    	at com.appiancorp.ps.xmlfo.ss.PdfFromHtml.runSmartService(PdfFromHtml.java:58)
    	at com.appiancorp.ps.xmlfo.ss.AbstractDocumentGeneration.run(AbstractDocumentGeneration.java:49)
    	... 19 more
    2021-07-26 16:19:58,069 [ajp-nio-0.0.0.0-8009-exec-80] ERROR com.appiancorp.security.auth.saml.redirecter.SamlAuthProviderQueryStringGenerator - Could not find IdP entity Id: Idp Entity Id not stored on session or request
    2021-07-26 16:20:28,988 [Appian Timer - 1] WARN  com.appiancorp.common.ObjectSynchronizer - 1 services were missing users.
    2021-07-26 16:20:53 INFO [ConnectionTimeoutBasicDataSource-1044] com.appiancorp.a2.vpn.VPNTunnelNameService.lookupAllHostAddr DNS Lookup using VPN DNS servers: pwdenapnsql01.janus.cap
    2021-07-26 16:20:53 INFO [ConnectionTimeoutBasicDataSource-1044] sun.nio.ch.VPNDatagramChannel.bind VPNDatagramChannel - Binding to : 172.30.0.6
    2021-07-26 16:20:53 INFO [ConnectionTimeoutBasicDataSource-1044] com.appiancorp.a2.vpn.VPNTunnelNameService.lookupAllHostAddr VPN dns lookup result 10.151.13.75
    2021-07-26 16:21:17,053 [ajp-nio-0.0.0.0-8009-exec-76] ERROR com.appiancorp.ps.xmlfo.ss.PdfFromHtml - The PDF generation took longer than 10 seconds
    INTERRUPTED while loading Image
    2021-07-26 16:21:17,854 [ajp-nio-0.0.0.0-8009-exec-76] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=1342254558, classname=com.appiancorp.ps.xmlfo.ss.PdfFromHtml
    com.appiancorp.suiteapi.process.exceptions.SmartServiceException: java.lang.Exception: Error while generating the PDF file. The PDF file will not be available.
    	at com.appiancorp.suiteapi.process.exceptions.SmartServiceException$Builder.build(SmartServiceException.java:145)
Comment
  • We are using this plug in and the PDF from HTML smart service and started receiving errors yesterday and today.  It has been working for at least a month and just started failing in all environments today.  Here is a section of our tomcar-stdOut.log. It does appear that  it is a timeout issue, there are 2 in about 100 that do get converted.

    2021-07-26 16:19:32,413 [Appian Work Item - 40851 - execution09 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ps.xmlfo.ss.PdfFromHtml - The PDF generation took longer than 10 seconds
    INTERRUPTED while loading Image
    2021-07-26 16:19:33,214 [Appian Work Item - 40851 - execution09 : UnattendedJavaActivityRequest] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=-1878946949, classname=com.appiancorp.ps.xmlfo.ss.PdfFromHtml
    com.appiancorp.suiteapi.process.exceptions.SmartServiceException: java.lang.Exception: Error while generating the PDF file. The PDF file will not be available.
    	at com.appiancorp.suiteapi.process.exceptions.SmartServiceException$Builder.build(SmartServiceException.java:145)
    	at com.appiancorp.ps.xmlfo.ss.AbstractDocumentGeneration.run(AbstractDocumentGeneration.java:57)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131)
    	at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125)
    	at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:27)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:88)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequestResponseCreator.getJavaActivityResultResponse(UnattendedJavaActivityRequestResponseCreator.java:21)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.getJavaActivityResultResponse(UnattendedJavaActivityRequest.java:67)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
    	at com.appiancorp.common.persistence.data.AppianDataUserContextProvider.executeWithConsistentDataReads(AppianDataUserContextProvider.java:116)
    	at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter(ProcessContinuationRequest.java:68)
    	at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:102)
    	at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
    	at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:93)
    	at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.Exception: Error while generating the PDF file. The PDF file will not be available.
    	at com.appiancorp.ps.xmlfo.ss.PdfFromHtml.runSmartService(PdfFromHtml.java:58)
    	at com.appiancorp.ps.xmlfo.ss.AbstractDocumentGeneration.run(AbstractDocumentGeneration.java:49)
    	... 19 more
    2021-07-26 16:19:58,069 [ajp-nio-0.0.0.0-8009-exec-80] ERROR com.appiancorp.security.auth.saml.redirecter.SamlAuthProviderQueryStringGenerator - Could not find IdP entity Id: Idp Entity Id not stored on session or request
    2021-07-26 16:20:28,988 [Appian Timer - 1] WARN  com.appiancorp.common.ObjectSynchronizer - 1 services were missing users.
    2021-07-26 16:20:53 INFO [ConnectionTimeoutBasicDataSource-1044] com.appiancorp.a2.vpn.VPNTunnelNameService.lookupAllHostAddr DNS Lookup using VPN DNS servers: pwdenapnsql01.janus.cap
    2021-07-26 16:20:53 INFO [ConnectionTimeoutBasicDataSource-1044] sun.nio.ch.VPNDatagramChannel.bind VPNDatagramChannel - Binding to : 172.30.0.6
    2021-07-26 16:20:53 INFO [ConnectionTimeoutBasicDataSource-1044] com.appiancorp.a2.vpn.VPNTunnelNameService.lookupAllHostAddr VPN dns lookup result 10.151.13.75
    2021-07-26 16:21:17,053 [ajp-nio-0.0.0.0-8009-exec-76] ERROR com.appiancorp.ps.xmlfo.ss.PdfFromHtml - The PDF generation took longer than 10 seconds
    INTERRUPTED while loading Image
    2021-07-26 16:21:17,854 [ajp-nio-0.0.0.0-8009-exec-76] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=1342254558, classname=com.appiancorp.ps.xmlfo.ss.PdfFromHtml
    com.appiancorp.suiteapi.process.exceptions.SmartServiceException: java.lang.Exception: Error while generating the PDF file. The PDF file will not be available.
    	at com.appiancorp.suiteapi.process.exceptions.SmartServiceException$Builder.build(SmartServiceException.java:145)
Children
No Data