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
Comments
0 comments
Please sign in to leave a comment.