Licensing | Aspose.Page for Java

Evaluation Version Limitations

We want our customers to test our components thoroughly before buying so the evaluation version allows you to use it as you would normally. However, the unlicensed product:

Classic license

The license can be loaded from a file or stream object. The easiest way to set a license is to put the license file in the same folder as the aspose-page-xx.x.jar file and specify the filename, without a path, as shown in the example below.

Apply License using File or Stream Object

The easiest way to apply a license is to put the license file in the same folder as the aspose-page-xx.x.jar file and specify just the file name without a path.

If you use are using any other Aspose for Java component along with Aspose.Page for Java, please specify a complete namespace for License like com.aspose.page.License.

Loading a License from File

The easiest way to apply a license is to put the license file in the same folder as the aspose-page-xx.x.jar file and specify just the filename without a path.

When you call the setLicense method, the license name that you pass should be that of your license file. For example, if you change the license file name to “Aspose.Page.Java.lic.xml” pass that filename to the com.aspose.page.License.setLicense(…) method. The license file can be specified for Aspose.Page for Java or you can use Aspose.Total for Java license file.

1// Apply a License from File
2
3String licenseFilePath = getLicenseFullPath();
4
5com.aspose.page.License license = new com.aspose.page.License();
6license.setLicense(licenseFilePath);

Loading a License from a Stream Object

The following example shows how to load a license from a stream.

1// Apply a License from Stream Object
2
3String licenseFilePath = getLicenseFullPath();
4try (FileInputStream licenseStream = new FileInputStream(licenseFilePath)) {
5    com.aspose.page.License license = new com.aspose.page.License();
6    license.setLicense(licenseStream);

Metered License

Aspose.Page allows developers to apply metered key. It is a new licensing mechanism. The new licensing mechanism will be used along with existing licensing method. Those customers who want to be billed based on the usage of the API features can use the metered licensing. For more details, please refer to Metered Licensing FAQ section.

A new class Metered has been introduced to apply metered key. Following is the sample code demonstrating how to set metered public and private keys.

1// Apply a License from Stream Object
2
3// set metered public and private keys
4com.aspose.page.Metered metered = new com.aspose.page.Metered();
5// Access the setMeteredKey property and pass public and private keys as parameters
6metered.setMeteredKey(
7    "<type public key here>",
8    "<type private key here>");

Have any questions about Aspose.Page?



Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.