You can easily download an evaluation version of Aspose.Metafiles from its download page . The evaluation version provides absolutely the same capabilities as the licensed version of Aspose.Metafiles. Furthermore, evaluation version simply becomes licensed when you purchase a license and add a couple of lines of code to apply the license.
Evaluation Version Limitation
Evaluation version of Aspose.Metafiles (without a license specified) provides full product functionality except that when you render metafile or save it in raster image format, an Evaluation Watermark is injected at the center of image.
|
Figure: Evaluation Watermark
|
Note: If you want to test Aspose.Metafiles without evaluation version limitations, you can also request a 30 Day Temporary License. Please refer to How to get a Temporary License?
About 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 file is digitally signed, so don't modify the file. Even inadvertent addition of an extra line break into the file will invalidate it.
You need to set a license before utilizing Aspose.Metafiles if you want to avoid its evaluation limitations. It is only required to set a license once per application (or process).
Setting a License in Aspose.Metafiles for Java
In Aspose.Metafiles for Java, license can be loaded from a stream. You can put your license file at any location and then create a stream that references the license file. You can pass the stream (containing the license file) into SetLicense method. The License class will automatically find the license file through the stream.
Example:
[Java]
try
{
//Create a stream object containing the license file
FileInputStream fstream=new FileInputStream("C:\\Aspose.Slides.lic");
//Instantiate the License class
License license=new License();
//Set the license through the stream object
license.setLicense(fstream);
}
catch(Exception ex)
{
//Printing the exception, if it occurs
System.out.println(ex.toString());
}
finally
{
//Closing the stream finally
if(fstream != null)
fstream.close();
}