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.

Notes:

  • An Aspose JAVA Words license is required and must be provided to the smart service in order for it to work accordingly.
  • Original plugin creation credit goes to Shaun Freeman.
Anonymous
  • As this smart service covert docx to pdf in letter but i want pdf in A4 size is it possible?

  • Hi ,

    Can you tell me whether the Aspose DocX to PDF plugin converts the word documents into 508 compliant PDFs? If not, are there plans to add the capability of converting into 508 compliant PDFs?

    Thanks!

  • Hello, I am receiving this error when I deploy the plugin in an on premise installation:

    ERROR com.appiancorp.plugins.LoggingPluginEventListener - Failed to enable Plug-in 'Convert Docs To PDF' (com.appiancorp.ps.plugins.aspose) version 1.2.2:
    '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)'

    I have seen this: https://community.appian.com/support/w/kb/320/kb-1097-illegal-attempt-to-change-the-data-type-for-smart-service-x-x-x-input-or-output-named-name-error-thrown-during-plugin-deployment

    But it is not what is really happening.

    Can someone please help me?

  • 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!

    Aspose Error Log From CHK PROD.txt
    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)