Licensing

Overview

Aspose.Slides can be used in evaluation mode or with a valid license. The evaluation version provides the same functionality as the licensed version, but it adds an evaluation watermark when presentations are opened or saved and limits text extraction to one slide.

This article explains how licensing works in Aspose.Slides and how to apply a license before using the library. A license can be loaded from a file, stream, or embedded resource by using the License class. The article also shows how to validate whether a license has been applied correctly.

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.

Apply 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);

Validate 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

FAQ

Can I apply the license in a completely offline environment (no internet access)?

Yes. License validation is performed locally using the license file; no internet connection is required.

What happens after the one-year subscription expires? Will the library stop working?

No. The license is perpetual: you can continue using versions released before your subscription end date; you just won’t be eligible to use newer releases without renewing.