Licensing
Evaluate Aspose.Slides
You can download an evaluation version of Aspose.Slides for Java from its download page. The evaluation version provides the same functionalities as the licensed version of the product. The evaluation package is the same as the purchased package. The evaluation version simply becomes licensed after you add a few lines of code to it (to apply the license).
Once you are happy with your evaluation of Aspose.Slides, you can purchase a license. We recommend you go through the different subscription types. If you have questions, contact the Aspose sales team.
Every Aspose license comes with one-year subscription for free upgrades to new versions or fixes released within the subscription period. Users with licensed products (or even evaluation versions) get free and unlimited technical support.
Evaluation version limitations
- While Aspose.Slides evaluation version (without a license specified) provides full product functionality, it inserts an evaluation watermark at the top of the document on open and save operations.
- You are limited to one slide when extracting texts from presentation slides.
Licensing in Aspose.Slides
- An evaluation version becomes licensed after you purchase a license and add a couple of lines of code to it (to apply the license).
- The license is a plain-text XML file that contains details such as the product name, number of developers it is licensed to, subscription expiry date, and so on.
- The license file is digitally signed, so you must not modify the file. Even an inadvertent addition of an extra line break to the contents of the file will invalidate it.
- Aspose.Slides for Java typically tries to find the license in these locations:
- An explicit path
- The folder containing Aspose.Slides.jar
- To avoid the limitations associated with the evaluation version, you need to set a license before using Aspose.Slides. You only have to set a license once per application or process.
Applying a License
A license can be loaded from a file or stream.
File
The easiest method of setting a license requires you to place the license file in the folder containing Aspose.Slides.jar or your applications' jar.
This Java code shows you how to set a license file:
// Instantiates the License class
com.aspose.slides.License license = new com.aspose.slides.License();
// Sets the license file path
license.setLicense("Aspose.Slides.Java.lic");
If you place the license file in a different directory, when you call the SetLicense method, the license file name at the end of the specified explicit must be the same as your license file.
For example, you can change the license file name to Aspose.Slides.Java.lic.xml. Then, in your code, you have to pass the path to the file (ending with Aspose.Slides.Java.lic.xml) to the SetLicense method.
Stream
You can load a license from a stream. This Java code shows you how to apply a license from a stream:
// Instantiates the License class
com.aspose.slides.License license = new com.aspose.slides.License();
// Sets the license through a stream
license.setLicense(new java.io.FileInputStream("Aspose.Slides.Java.lic"));
PHP/Java Bridge
If you use Aspose.Slides for PHP via Java, you can set a license through a PHP/Java bridge. This bridge allows you to use Java classes in PHP syntax. For more information, see License in PHP.
Validating a License
To check whether a license has been set properly, you can validate it. This Java code shows you how to validate a license:
License license = new License();
license.setLicense("Aspose.Slides.Java.lic");
if (License.isLicensed())
{
System.out.println("License is good!");
}