Convert DocX to PDF (Aspose)

Overview

This plugin contains a smart service to convert .docx documents to PDF using Aspose Libraries with support for custom fonts and optionally encrypt the final PDF document. It will also maintain the PDF structure for 508 compliance as well as compress the file to maintain a low file size. An Aspose JAVA Words license is required and must be provided to the smart service in order for it to work accordingly. 

Key Features & Functionality

  • Convert DocX to PDF (Aspose)
Anonymous
  • Hi Shaun.freeman(Author),

    We are using Aspose docx to PDF conversion service and we have licence. In instance we are getting "error code 99" and not getting any error message. could you please help me here, what its mean.

    Regards,

    Vikram Kumar Singh

  • Would this allow appian to convert pdf to pdf/a?

  • Hi Shaun.freeman(Author),

    We have below error when we deployed this Plugin, and we also tried to remove the old one and redeploy, but the issue is same. Can you pls help share any guidance? Thank you

    2021-07-29 01:27:25,823 [Appian Plugin Hot Deploy] INFO com.appiancorp.plugins.osgi.LoggingPluginFactoryDecorator - Plug-in Artifact 'com.appiancorp.ps.plugins.aspose-1.2.1.jar' SHA256 hash is 275d7e231635cd0265043f8f1063c7f94070b2e85b3c88f51709f6f02e90d4d9 2021-07-29 01:27:26,959 [Appian Plugin Hot Deploy] WARN com.appiancorp.type.config.plugin.PojoDatatypesConfig - The data type [uuid={http://types.appiancorp.com/ps}DocumentData] in plug-in [key=com.appiancorp.ps.plugins.aspose, module=DocumentData] was not imported because it or another data type in the plug-in module was already present on the system with a different structure, but the version of the plug-in that provided the existing data type could not be determined. If you intend to change the structure of this data type you must first delete the data type from the system and deploy this plug-in again. If the problem persists, 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. If you did not intend to change the structure of this data type, this message can be safely ignored as it is a false positive in the structure comparison mechanism. Please submit the plug-in and accompanying log messages to Appian Support for further analysis. (APNX-1-4165-003) 2021-07-29 01:27:26,976 [Appian Plugin Hot Deploy] ERROR com.atlassian.plugin.manager.DefaultPluginManager - There was an error loading the descriptor 'Convert DocX to PDF (Aspose)' of plugin 'com.appiancorp.ps.plugins.aspose'. Disabling. com.atlassian.plugin.PluginException: com.appiancorp.suiteapi.common.exceptions.AppianRuntimeException: com.appiancorp.process.admin.IncompatibleSmartServiceRegistrationException: The Smart Service Module was invalid: Illegal attempt to change the data type for smart service com.appiancorp.ps.plugins.aspose.DOCXToPDFUtil, input or output named fileDataList (APNX-1-4104-005) at com.appiancorp.plugins.ExceptionHandlingModuleDescriptor.enabled(ExceptionHandlingModuleDescriptor.java:68) at com.atlassian.plugin.manager.DefaultPluginManager.notifyModuleEnabled(DefaultPluginManager.java:1792) at com.appiancorp.plugins.AppianPluginManager.notifyModuleEnabled(AppianPluginManager.java:74) at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModule(DefaultPluginManager.java:1568) at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModules(DefaultPluginManager.java:1545) at com.atlassian.plugin.manager.DefaultPluginManager.enableDependentPlugins(DefaultPluginManager.java:1214) at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1170) at com.atlassian.plugin.manager.DefaultPluginManager.scanForNewPlugins(DefaultPluginManager.java:891) at com.appiancorp.plugins.AppianPluginManager.scanForNewPlugins0(AppianPluginManager.java:212) at com.appiancorp.plugins.AppianPluginManager.scanForNewPlugins(AppianPluginManager.java:204) at com.appiancorp.plugins.AppianPluginManager.scanResultIfNotDeployingPlugins(AppianPluginManager.java:192) at com.appiancorp.plugins.HotDeployerRunnable.run(HotDeployerRunnable.java:30) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) 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: com.appiancorp.suiteapi.common.exceptions.AppianRuntimeException: com.appiancorp.process.admin.IncompatibleSmartServiceRegistrationException: The Smart Service Module was invalid: Illegal attempt to change the data type for smart service com.appiancorp.ps.plugins.aspose.DOCXToPDFUtil, input or output named fileDataList (APNX-1-4104-005) at com.appiancorp.process.ActivityClassSupplierModern.registerInternal(ActivityClassSupplierModern.java:338) at com.appiancorp.process.ActivityClassSupplierLazyData.register(ActivityClassSupplierLazyData.java:86) at com.appiancorp.process.ActivityClassSupplier.get(ActivityClassSupplier.java:85) at com.appiancorp.process.SmartServiceModuleDescriptor.enabledInternal(SmartServiceModuleDescriptor.java:203) at com.appiancorp.plugins.ExceptionHandlingModuleDescriptor.enabled(ExceptionHandlingModuleDescriptor.java:66) ... 18 more 2021-07-29 01:27:26,984 [Appian Plugin Hot Deploy] ERROR com.appiancorp.plugins.LoggingPluginEventListener - Failed to enable Plug-in 'Convert Docs To PDF' (com.appiancorp.ps.plugins.aspose) version 1.2.1: 'There was a problem loading the module descriptor: Convert DocX to PDF (Aspose).<br/>com.appiancorp.suiteapi.common.exceptions.AppianRuntimeException: com.appiancorp.process.admin.IncompatibleSmartServiceRegistrationException: The Smart Service Module was invalid: Illegal attempt to change the data type for smart service com.appiancorp.ps.plugins.aspose.DOCXToPDFUtil, input or output named fileDataList (APNX-1-4104-005)'

  • Hi shaun.freeman(Author),

    We have a random issue with this smart service. Please find the issue description and the error log file attached.

    Issue Description:

    We have used this node to convert Docx to PDF inside a sub-process. And we have configured an exception timer to the sub-process node with an exception of 5 minutes. At some cases, this smart service node takes more than 5 minutes to render the PDF document. So, after 5 minutes, the exception path is taken and the smart service becomes unfinished. 

    As the process is taking exception path after 5 minutes, the input docx document for the smart service is reset to null which causes the null pointer exception error.

    Please let us know if this null error can be fixed in upcoming versions. Also, we would like to know why is it randomly taking more time to render the PDF document.

    FYI: The document is having only english fonts for some 3 pages and the same is rendered within few seconds in other environments(all environments are in same versions 19.4).

    Thanks!

    2021-07-06 07:09:36,230 [Appian Work Item - 650363 - execution02 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ps.plugins.aspose.utils.DocumentUtilAppian - com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException: Name is insufficiently unique
    
    2021-07-06 07:09:36,230 [Appian Work Item - 650363 - execution02 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ps.plugins.aspose.utils.ConvertToPDFSvc - java.lang.NullPointerException
    
                    at com.appiancorp.ps.plugins.aspose.utils.DocumentUtilAppian.createNewDocument(DocumentUtilAppian.java:145)
    
                    at com.appiancorp.ps.plugins.aspose.utils.CreatePDFInAppian.convert(CreatePDFInAppian.java:55)
    
                    at com.appiancorp.ps.plugins.aspose.utils.ConvertToPDFSvc.run(ConvertToPDFSvc.java:39)
    
                    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:25)
    
                    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125)
    
                    at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83)
    
                    at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
    
                    at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:71)
    
                    at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:100)
    
                    at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
    
                    at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:84)
    
                    at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
    
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    
                    at java.lang.Thread.run(Thread.java:745)


  • Compatible version was mentioned as 17.1+, 20.2. Does it mean it doesn't support 21.x+ versions? Will it support Arabic language?

  • Will plugin preserve Arabic language characters in PDF after it was converted the DOCX

  • We are having issues with converting word document to Pdf.

    We have downloaded the plugin from AppMarket. However, it is asking a bunch of fields to configure.

    Where can I find this information.

    Though it says free, I believe to configure the smart service in Appian, we might need to have a license.

    Any thoughts please....

  • For some reason I had issues changing the target folder, I couldn't tell if it was security or something but I moved the "Aspose Results" folder into my knowledge center and it worked.

    So I guess the results folder being pointed to by the constant must specifically be named "Aspose Results"?

  • This plugin has much better conversion from DOCX to PDF than Dynamic Document Generation and Advanced Document Templating.

    It is able to hold the formatting almost 1 to 1 from the DOCX template, which I needed because I had to have a watermark on the PDF and none of the other plugins seemed to be able to do it without formatting issues of some kind. The PDF Watermark plugin didn't work since just puts the watermark not in the center and has no settings.

    To try the plugin without actually buying the license, you must go to https://purchase.aspose.com/, add only Aspose.Words for Java to to the cart, fill the contact info and hit "get temporary license" on the Contact Info screen.

    The license will be attached to the email they send you, which you will need to swap into the constant that is fed into the node.

  • Hi !!

    Converting Word to PDF and having Issue with Encoding Korean

    I generated word document by using "DOCX From Dynamic Template" smart service.

    And got result like below.

    --> after using "convert DocX To PDF" smart service and converting word to PDF file

    Encoding error occurred and can't see Korean.

     

    How can I see Korean?