Licensing

Sometimes, to study the system better, you want to dive into the code as fast as possible. To make this easier, GroupDocs.Conversion offers a Free Trial and a 30-day Temporary License for evaluation and provides different purchase plans.

Note
Note that there are a number of general policies and practices that guide you on how to evaluate, properly license, and purchase our products. You can find them in the “Purchase Policies and FAQ” section.

Free Trial or Temporary License

You can try GroupDocs.Conversion without buying a license.

Free Trial

The evaluation version is the same as the purchased one – the evaluation version simply becomes licensed when you set the license. You can set the license in a number of ways that are described in the next sections of this article.

The evaluation version comes with the limitations:

  • Only the first 3 pages are processed.
  • Documents with more than 3 pages are not supported.
  • Trial badges are placed in the document on the top of each page.
  • At most 10 conversions are allowed per process — see Conversion limit per process.

Conversion limit per process

Without a license, GroupDocs.Conversion allows 10 conversions and then refuses further ones until a license is applied. This limit is in addition to the evaluation limitations listed above; it does not replace them.

The allowance belongs to the loaded library instance, so restarting the application starts a fresh allowance. The 11th conversion throws GroupDocs.Conversion.Exceptions.EvaluationLimitReachedException (derived from GroupDocsConversionException) with the following message:

You are using GroupDocs.Conversion in evaluation mode: the limit of 10 documents converted per process has been reached. Get a free 30-day temporary license to remove all evaluation limits: https://purchase.groupdocs.com/temporary-license/

What counts as one conversion

Every Converter.Convert(...) call counts as exactly one, whichever overload is used — file or stream target, fixed options or an options provider, document-level or page-level callbacks, and the fluent API. The LowCode converters count the same way, since they run the same pipeline. A call counts when it starts, so a conversion that fails — for example because of invalid convert options — still uses one of the 10.

A source that produces many output documents — an archive, a document saved page by page, an email with attachments — still counts as one. The limit applies to conversion calls, not to produced files.

What does not count

  • Converter.GetDocumentInfo()
  • Converter.IsDocumentPasswordProtected()

Inspecting a document is not converting it, so these methods can be called freely in evaluation mode.

Handling the limit

using GroupDocs.Conversion;
using GroupDocs.Conversion.Exceptions;
using GroupDocs.Conversion.Options.Convert;

try
{
    using (Converter converter = new Converter("sample.docx"))
    {
        converter.Convert("converted.pdf", new PdfConvertOptions());
    }
}
catch (EvaluationLimitReachedException ex)
{
    // The evaluation allowance for this process is used up.
    // Apply a license to continue converting.
    Console.WriteLine(ex.Message);
}

Removing the limit

Apply a license before converting — a license file, a license stream, or a metered license. Any of these switches the limit off for the rest of the process. Once a valid license is applied, conversions are neither counted nor capped, and conversions already performed in evaluation mode do not count against the licensed run.

Warning
A license that is missing, expired, corrupt, or issued for a different product does not lift the limit — the evaluation allowance keeps counting.

Temporary License

If you wish to test GroupDocs.Conversion without the limitations of the trial version, you can also request a 30-day Temporary License. For more details, see the “Get a Temporary License” page.

How to set up a license

Note
You can find pricing information on the “Pricing Information” page.

After the license is obtained you need to set up the license. This section describes options of how this can be done and also comments on some common questions.

The license should be set:

  • Only once per application domain,
  • and before using any other GroupDocs.Conversion classes.
Note
The license can be set multiple times per app domain but we recommend doing it once since all calls to the SetLicense method except for the first one will just waste processor time.

Set License from File

The following code sets a license from a file.

string licensePath = "path to the .lic file";
License license = new License();
license.SetLicense(licensePath);

Set License from Stream

The following example shows how to set a license from a stream.

string licensePath = "path to the .lic file";
using (FileStream fileStream = File.OpenRead(licensePath))
{
    License license = new License();
    license.SetLicense(fileStream);
}

Set Metered License

You can also set Metered license as an alternative to the license file. It is a new licensing mechanism that will be used along with the existing licensing method. It is useful for customers who want to be billed based on the usage of the API features. For more details, please refer to Metered Licensing FAQ section.

Following is the sample code demonstrating how to use Metered licensing.

string publicKey = ""; // Your public license key
string privateKey = ""; // Your private license key

Metered metered = new Metered();
metered.SetMeteredKey(publicKey, privateKey);

// Get amount (MB) consumed
decimal amountConsumed = GroupDocs.Conversion.Metered.GetConsumptionQuantity();
Console.WriteLine("Amount (MB) consumed: " + amountConsumed);

// Get count of credits consumed
decimal creditsConsumed = GroupDocs.Conversion.Metered.GetConsumptionCredit();
Console.WriteLine("Credits consumed: " + creditsConsumed);
Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.