KB-2105 Aspose plugins FAQ

The purpose of this article is to answer some of the common questions regarding usage of Aspose libraries in custom plugins. Refer to Appian's Extending Appian documentation to get started with custom plugins. All Appian AppMarket plugin policies apply to plugins using Aspose.

Table of Contents:

What are the Appian Cloud policies for Aspose?

  1. Aspose trial licenses are not valid for use on Appian Cloud.
  2. Aspose license files may not be bundled in the plugin JAR. License files must be read in from an Appian Knowledge Center via the plugin code and passed to the Aspose library.
  3. The Aspose license must be a required input parameter to the plugin function or smart service. 

The Aspose libraries are available to download for free, so why can't I use them in my AppMarket plugin?

Aspose libraries are provided free for trial and evaluation purposes only. According to the Aspose EULA, "When using an Evaluation Version or a Temporary License, You MAY NOT use the Product to produce any Derived Works with the exception of Works produced exclusively for the purpose of Product Evaluation."

How do I initiate an Aspose license in my plugin?

For Aspose.Words, use the setLicense() method of com.aspose.words.license.
Below is an example of initiating an Aspose.Words license in an Appian smart service plugin:

import com.appiancorp.suiteapi.content.ContentConstants;
import com.appiancorp.suiteapi.content.ContentService;
import com.appiancorp.suiteapi.process.framework.Input;
import com.appiancorp.suiteapi.process.framework.Required;
import com.aspose.words.License;
import com.aspose.words.Document;

public class ConvertDoc extends AppianSmartService {
private static final Logger LOG = Logger.getLogger(ConvertDoc.class);
private ContentService cs;
private Long licenseDocId;

public ConvertDoc(ContentService cs){
this.cs = cs;
}

@Input(required = Required.ALWAYS)
public void setLicenseDocId(Long licenseDocId) {
this.licenseDocId = licenseDocId;
}

@Override
public void run() throws SmartServiceException {
String licensePath = cs.getInternalFilename(cs.getVersionId(licenseDocId, ContentConstants.VERSION_CURRENT));
com.aspose.words.License license = new com.aspose.words.License();
license.setLicense(licensePath);
//Perform work with Aspose
}
}

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: April 2020

Related
Recommended