Overview
This version is for Appian 22.3 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 22.2 and lower version in the folder pre-22.3
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
Hi Raza
We are using the Appian version 21.3 and we have trouble converting DOCX and HTML to PDF when it contains Greek characters. They just appear like this ########. Is there a solution to that?
Hi Raza.mir,
We are using plugin version 1.8.6, where we encountered issue with smart service "DOCX from XHTML", this smart service is failing with below error. When i checked node duration it is almost running for 4 and half days.
"The amount of time allocated for the completion of an unattended activity was insufficient to allow the activity to complete."
FYI - Appian version - 21.2
The older version works as expected(1.8.2), could you please look into this.
Thanks
Raza Mir do you have any plans to update this plugin. We are waiting for your response.
FYI - PDF from EML doesn't seem to work. Based on the error and googling it seems like some sort of jar conflict, but I'm not too sure.
2021-09-17 13:13:31,286 [ThreadPoolTaskExecutor-4481] ERROR com.appiancorp.process.workpoller.WorkItemListener - The following exception occurred while attempting to complete work item [[WorkId: 45, EngineId: execution00, Request: UnattendedJavaActivityRequest:13213 as rob.turverey@groundswellcg.com by rob.turverey@groundswellcg.com, Response: null]] - Exception: javax.resource.spi.work.WorkCompletedException: java.lang.NoSuchMethodError: com.sun.mail.util.LineInputStream.<init>(Ljava/io/InputStream;Z)V at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:247) 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.NoSuchMethodError: com.sun.mail.util.LineInputStream.<init>(Ljava/io/InputStream;Z)V at javax.mail.internet.InternetHeaders.load(InternetHeaders.java:422) at javax.mail.internet.InternetHeaders.<init>(InternetHeaders.java:380) at javax.mail.internet.MimeMessage.createInternetHeaders(MimeMessage.java:2304) at javax.mail.internet.MimeMessage.parse(MimeMessage.java:353) at javax.mail.internet.MimeMessage.<init>(MimeMessage.java:223) at org.nickrussler.mimeparser.MimeMessageConverter.convertToPdf(MimeMessageConverter.java:93) at com.appiancorp.ps.xmlfo.ss.PdfFromEml.runSmartService(PdfFromEml.java:39) at com.appiancorp.ps.xmlfo.ss.AbstractDocumentGeneration.run(AbstractDocumentGeneration.java:49) 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:123) at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36) at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:94) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
Any Update Raza Mir
Hi Raza Mir(Author)
We are having issues with this plugin when generating a PDF doc form DOCX. This plugin is working whit out any issues until 21.2 Version. We recently upgraded one environment to Appian latest version 21.3. After this upgrade the PDF from Single DOCX (with Fonts) smart service is breaking when generating document. The same DOCX document we will be able to convert in other environments(21.2). We are not sure what is the root cause. I see based on the documentation it supports until 20.4. Could you please update this plugin to support the latest versions.
The following is the log error from the tomcat-stdOut.log
Fri Sep 10 17:03:08 GMT 2021 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. org.docx4j.org.xhtmlrenderer.load INFO:: SAX XMLReader in use (parser): org.apache.xerces.parsers.SAXParser org.docx4j.org.xhtmlrenderer.load INFO:: Loaded document in ~2ms org.docx4j.org.xhtmlrenderer.load INFO:: TIME: parse stylesheets 2ms org.docx4j.org.xhtmlrenderer.match INFO:: media = print org.docx4j.org.xhtmlrenderer.match INFO:: Matcher created with 140 selectors 2021-09-10 17:03:11,172 [Appian Work Item - 18654 - execution01 : UnattendedJavaActivityRequest] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=268443458, classname=com.appiancorp.ps.xmlfo.ss.PdfFromDocxWithFonts com.appiancorp.suiteapi.process.exceptions.SmartServiceException: org.docx4j.openpackaging.exceptions.Docx4JException: Exception exporting package 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:123) at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36) at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:94) 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: org.docx4j.openpackaging.exceptions.Docx4JException: Exception exporting package at org.docx4j.convert.out.common.AbstractExporter.export(AbstractExporter.java:106) at org.docx4j.Docx4J.toFO(Docx4J.java:708) at com.appiancorp.ps.xmlfo.util.XmlFoConverter.docxToPdf(XmlFoConverter.java:103) at com.appiancorp.ps.xmlfo.ss.PdfFromDocxWithFonts.runSmartService(PdfFromDocxWithFonts.java:54) at com.appiancorp.ps.xmlfo.ss.AbstractDocumentGeneration.run(AbstractDocumentGeneration.java:49) ... 19 more Caused by: org.docx4j.openpackaging.exceptions.Docx4JException: Exception writing Document to OutputStream: org.apache.fop.fo.ValidationException: For "fo:root", "fo:layout-master-set" must be declared before "fo:page-sequence"! (See position 1:258) at org.docx4j.utils.XmlSerializerUtil.serialize(XmlSerializerUtil.java:56) at org.docx4j.utils.XmlSerializerUtil.serialize(XmlSerializerUtil.java:18) at org.docx4j.convert.out.fo.renderers.FORendererApacheFOP.render(FORendererApacheFOP.java:247) at org.docx4j.convert.out.fo.renderers.FORendererApacheFOP.render(FORendererApacheFOP.java:181) at org.docx4j.convert.out.fo.AbstractFOExporter.postprocess(AbstractFOExporter.java:168) at org.docx4j.convert.out.fo.AbstractFOExporter.postprocess(AbstractFOExporter.java:47) at org.docx4j.convert.out.common.AbstractExporter.export(AbstractExporter.java:81) ... 23 more Caused by: javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: For "fo:root", "fo:layout-master-set" must be declared before "fo:page-sequence"! (See position 1:258) at org.docx4j.org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:535) at org.docx4j.utils.XmlSerializerUtil.serialize(XmlSerializerUtil.java:51) ... 29 more Caused by: org.apache.fop.fo.ValidationException: For "fo:root", "fo:layout-master-set" must be declared before "fo:page-sequence"! (See position 1:258) at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38) at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58) at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:173) at com.sun.proxy.$Proxy904.nodeOutOfOrder(Unknown Source) at org.apache.fop.fo.FONode.nodesOutOfOrderError(FONode.java:542) at org.apache.fop.fo.FONode.nodesOutOfOrderError(FONode.java:528) at org.apache.fop.fo.pagination.Root.validateChildNode(Root.java:155) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:277) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179) at org.docx4j.org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1119) at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:496) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324) at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845) at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1196) at org.docx4j.org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:518) ... 30 more Fri Sep 10 17:03:11 GMT 2021 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Exception in thread "ThreadPoolTaskExecutor-1773" java.lang.NoClassDefFoundError: com/lowagie/text/pdf/BaseFont at org.docx4j.org.xhtmlrenderer.docx.DocxRenderer.<init>(DocxRenderer.java:160) at org.docx4j.org.xhtmlrenderer.docx.DocxRenderer.<init>(DocxRenderer.java:85) at org.docx4j.convert.in.xhtml.XHTMLImporterImpl.getRenderer(XHTMLImporterImpl.java:271) at org.docx4j.convert.in.xhtml.XHTMLImporterImpl.convert(XHTMLImporterImpl.java:538) at com.appiancorp.ps.xmlfo.ss.DocxFromXhtmlWithStyling.runSmartService(DocxFromXhtmlWithStyling.java:70) at com.appiancorp.ps.xmlfo.ss.AbstractDocumentGeneration.run(AbstractDocumentGeneration.java:49) 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:123) at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36) at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:94) 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.ClassNotFoundException: com.lowagie.text.pdf.BaseFont not found by DynamicDocumentGen [89] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1650) at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2064) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ... 25 more
Raza, we attempted to upgrade the plugin tot he newest version about 3 weeks ago and got the errors indicated in the below message. We needed to have Appian revert our version back to the old version because we could not get the new version to work without an error. Can you please respond to let us know if we have something configuring incorrectly or if you have a fix for the error.
We even had Appian increase the timeout hoping that would help evaluate the error but we still had the issue.
Thank you
We are using this plugin and the PDF from HTML smart service and are getting a timeout error and the PDFs are not getting created. This has been working for at least a month and is now failing in all environments and just started yesterday.
This is part of the log error from the tomcat-stdOut.log
ERROR com.appiancorp.ps.xmlfo.ss.PdfFromHtml - The PDF generation took longer than 10 seconds