Licensing

Evaluate Aspose.Slides

Evaluation Version Limitations

  • While the Aspose.Slides evaluation version (when no license is applied) provides full product functionality, it inserts an evaluation watermark at the top of the document during open and save operations.
  • Text extraction is limited to one slide when using the evaluation version.

Licensing in Aspose.Slides

  • An evaluation version becomes licensed after you purchase a license and apply it by adding a couple of lines of code.
  • The license is a plain-text XML file that contains details such as the product name, the number of developers it is licensed to, the subscription expiry date, and more.
  • The license file is digitally signed, so it must not be modified. Even an accidental change—such as adding a line break—will invalidate the file.
  • Aspose.Slides for C++ typically looks for the license file in the following locations:
    • A path explicitly specified in your code
    • The folder containing the component’s DLL (included in Aspose.Slides)
    • The folder containing the assembly that calls the component’s DLL
  • To avoid the limitations of the evaluation version, you must set the license before using Aspose.Slides. A license only needs to be set once per application or process.

Applying a License

A license can be loaded from a file, a stream, or an embedded resource.

File

The easiest way to set a license is to place the license file in the same folder as the component’s DLL (included in Aspose.Slides) and specify only the file name, without the path.

The following C++ code shows how to set a license file:

#include <Util/License.h>

using namespace Aspose::Slides;

int main()
{
    auto license = MakeObject<License>();
    license->SetLicense(u"Aspose.Slides.lic");

    return 0;
}

Stream

You can load a license from a stream. The following C++ code shows how to apply a license from a stream:

auto license = MakeObject<License>();

auto stream = File::OpenRead(u"Aspose.Slides.lic");

license->SetLicense(stream);

Validating a License

To check whether a license has been set properly, you can validate it. The following C++ code shows how to validate a license:

auto license = MakeObject<License>();

license->SetLicense(u"Aspose.Slides.lic");

if (license->IsLicensed())
{
    Console::WriteLine(u"License is good!");
    Console::ReadKey();
}

Thread Safety