Licensing

Skip to end of metadata
Go to start of metadata
You can easily download an evaluation version of Aspose.Pdf for Java from the download page. . The evaluation version provides absolutely the same capabilities as the licensed version of the component. Furthermore, evaluation version simply becomes licensed when you add a couple of lines of code to apply the license.
Evaluation Version Limitations

Evaluation version of Aspose.Pdf for Java (without a license specified) provides full product functionality, but please Note : At top of all pages in the generated PDF documents are watermarked with "Evaluation Only. Created with Aspose.Pdf. Copyright 2002-200 9 Aspose Pty Ltd" as demos run with an Evaluation License.

The watermark inserted by the evaluation version are shown in the drawing below:

Setting a License Purchased After 2005/01/22

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 file is digitally signed, so don’t modify the file. Even inadvertent adding of an extra line break into the file will invalidate it.

You need to set a license before performing any operations with documents. It is only required to set a license once per application (or process).

The lic ense can be loaded from a file or stream. Aspose.Pdf for Java will try to find the license in the following locations:

  1. Explicit path.
  2. The fol der that contains Aspose.Pdf.jar .

The easiest way to set a license is to put the license file in the same folder as Aspose.Pdf. jar and specify just the file name without path as shown in the following example:

If you want to test Aspose.Pdf without evaluation version limitations, you can also request a 30 Day Temporary License. Please refer to How to get a Temporary License?
If you use both Aspose.Word for Java and Aspose.Pdf for Java, Please specify the namespace for License like Aspose.Pdf.License.
Code Snippet

Java
// create license object    
com.aspose.pdf.License lic = new com.aspose.pdf.License();
try {
     // load the license file and instantiate it with Aspose.Pdf for Java object
     lic.setLicense(new FileInputStream(new File("Aspose.Custom.Java.lic")));
       	} catch (Exception e) 
		{
       		System.out.println(e.getMessage());
		}
 

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

Java
// create license object
com.aspose.pdf.License license = new com.aspose.pdf.License();
// load the license file into FileStream object
FileInputStream myStream = new FileInputStream("Aspose.Pdf.Java.lic");
// initialize Aspose.Pdf for Java license
license.setLicense(myStream);
 
Setting a License Purchased Before 2005/01/22

Aspose.Pdf for Java doesn't support old licenses anymore so please contact our Sales to get new license file.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.