You can easily download an evaluation version of Aspose.Total from its download page . The evaluation version provides absolutely the same capabilities as the licensed version of Aspose.Total. 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.Total (without a license specified) provides full product functionality except that most of the components inside the Aspose.Total insert Evaluation Watermark and Garbage Text in the output documents or applications. Only few components will have limitations in their features and these components include Aspose.iCalendar, Aspose.Network & Aspose.Workflow. For more details about their evaluation limitations, please visit the Documentation of these components.
Note: If you want to test Aspose.Total 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.Total 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.Total for .NET
In Aspose.Total for .NET, license can be loaded from a file, stream or an embedded resource.
Aspose.Total for .NET tries to find the license in the following locations:
- Explicit path
- The folder that contains the dll of the component (included in Aspose.Total)
- The folder that contains the assembly that called the dll of the component (included in Aspose.Total)
- The folder that contains the entry assembly (your .exe)
- An embedded resource in the assembly that called the dll of the component (included in Aspose.Total)
There are two common methods to set the license, which are discussed below:
1st Method (Using File or Stream)
The easiest way to set a license, is to put the license file in the same folder as that of the dll of the component (included in Aspose.Total) and specify just the file name without its path.
[C#]
//Instantiate an instance of license and set the license file through its path
Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense("Aspose.Total.lic");
[VB.NET]
'Instantiate an instance of license and set the license file through its path
Dim license As Aspose.Words.License = New Aspose.Words.License()
license.SetLicense("Aspose.Total.lic")
Note: When you call SetLicense method, the license name should be same as that of your license file name. For example, you may change the license file name to "Aspose.Total.lic.xml". Then in your code, you should use the modified license name (that is Aspose.Total.lic.xml) for the SetLicense method.
It is also possible to load a license from a stream.
[C#]
//Instantiate an instance of license and set the license through a stream
Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense(myStream);
[VB.NET]
'Instantiate an instance of license and set the license through a stream
Dim license as Aspose.Words.License = new Aspose.Words.License()
license.SetLicense(myStream)
2nd Method (Using Embedded Resource)
Another neat way of packaging the license with your application and making sure it will not be lost, is to include it as an embedded resource into one of the assemblies that calls the dll of the component (included in Aspose.Total). To include the license file as an embedded resource, perform the following steps:
- In Visual Studio .NET, include the license (.lic) file into the project using the File | Add Existing Item... menu
- Select the file in the Solution Explorer and set Build Action to Embedded Resource in the Properties window
To access the license embedded in the assembly (as embedded resource), it is not needed to call GetExecutingAssembly and GetManifestResourceStream methods of System.Reflection.Assembly class of Microsoft .NET Framework. All is needed to do, is to just add the license file as an embedded resource to your project and pass the name of the license file into SetLicense method. The License class will automatically find the license file in the embedded resources.
Please review the example given below to understand this method of setting license (embedded) in your applications.
[C#]
//Instantiate the License class
Aspose.Words.License license = new Aspose.Words.License();
//Pass only the name of the license file embedded in the assembly
license.SetLicense("Aspose.Total.lic");
[VB.NET]
'Instantiate the License class
Dim license As Aspose.Words.License = New Aspose.Words.License()
'Pass only the name of the license file embedded in the assembly
license.SetLicense("Aspose.Total.lic")
Setting a License in Aspose.Total for Java
In Aspose.Total 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.
[Java]
try
{
//Create a stream object containing the license file
FileInputStream fstream=new FileInputStream("C:\\Aspose.Total.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();
}