Licensing | Aspose.TeX for Java

Evaluation Version Limitations

The evaluation version of Aspose.TeX (without a license specified) provides full product functionality except that only up to four first pages can be obtained in the output document. Also, those pages will be stamped with an evaluation mode watermark.

If you want to try Aspose.TeX out without evaluation limitations, request a 30-day temporary license. Please refer to How to get a Temporary License? for more information.

Apply the License using File or Stream Object

Use the License.setLicense method to license the component. In the examples below, set licenseFilePath to the full path to your license file. The calling method must handle or declare Exception.

Loading a License from File

This code snippet applies a license stored in a file.

1// Apply a license from a file.
2// licenseFilePath is the full path to your Aspose.TeX for Java license.
3com.aspose.tex.License license = new com.aspose.tex.License();
4license.setLicense(licenseFilePath);

Loading a License from a Stream Object

These code snippets initialize the license from the stream.

1// Apply a license from a stream and close the stream after use.
2// licenseFilePath is the full path to your Aspose.TeX for Java license.
3com.aspose.tex.License license = new com.aspose.tex.License();
4try (java.io.InputStream licenseStream = new java.io.FileInputStream(licenseFilePath)) {
5    license.setLicense(licenseStream);
6}

Metered License

Aspose.TeX has an alternative licensing mechanism called Metered Licensing. If a customer wishes to be billed based on the usage of the API features, they can apply a Metered License, which is actually as simple as applying a cryptographic key pair. For more details, please refer to the Metered Licensing FAQ section.

The public and private keys of a metered license can be set using an instance of the Metered class, as shown below:

1// Apply a metered license using your own public and private keys.
2new com.aspose.tex.Metered().setMeteredKey(
3        "<type public key here>",
4        "<type private key here>");