How to automatically switch between licenses with remaining volume in FineReader Engine

Question

I have several activated licenses for FineReader Engine and want to automatically switch between them if there are no pages left on the current license.

Answer

To do this, you can use GetAvailableLicenses Method of the Engine Object and VolumeRemaining Property of the License Object. For example:

bool check = true;
var licenses = Engine.GetAvailableLicenses(projectId);
foreach (var lic in licenses)
{
if (lic.VolumeRemaining[FREngine.LicenseCounterTypeEnum.LCT_Pages] > 0)
{
Engine.SetCurrentLicense(lic);
check = false;
break;
}
}
if (check)
{
Engine.SetCurrentLicense(licenses.Item(0));
}

C# code snippet

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.

Recently viewed