Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.OCR for Java is a commercially licensed product that can be used in trial (evaluation) mode.
You can start using Aspose.OCR for Java right after the installation. In trial mode (without providing a license) you can recognize texts in any supported languages and save recognition results in any of the supported formats.
However, the following restrictions apply:
Apply a license to remove the restriction.
A temporary license removes a limitation of the trial version for 30 days. Use it to start building a fully functional OCR application and make the final decision to purchase Aspose.OCR for Java later.
To request a temporary license, visit “Get a Temporary License” page.
Aspose.OCR for Java is licensed either by the number of developers and locations (sites) where the products will be used (Developer and Site licenses) or by pay-per-use (Metered licenses).
Read License Types for details and purchase a license that best suits your needs.
After purchasing a license or obtaining a temporary license, you will receive a file with .lic extension. If needed, you can rename this file and change its extension.
The license must be applied once per application or process lifecycle before recognition starts.
Put the license file to a folder on your computer and insert the following code in your startup method:
// Initialize the licensing component
com.aspose.ocr.License license = new com.aspose.ocr.License();
// Load the license from file
license.SetLicense("Aspose_OCR_License_File.lic");
If only the name of the license file (without path) is specified, SetLicense
method will look for the license file in the following locations:
Alternatively, you can store the license file in any folder on your computer and specify an absolute or relative path. If you prefer to load the license from the explicit path, provide the full path in SetLicense
method.
Insert the following code in your startup method:
// Initialize the licensing component
com.aspose.ocr.License license = new com.aspose.ocr.License();
// Load the license from stream
license.setLicense(new java.io.FileInputStream("Aspose_OCR_License_File.lic"));
When you purchase a metered license, you will receive a Public/Private Key pair instead of a license file. Use the following code in your startup method to apply the license keys:
// License key pair
String publicKey = "PUBLIC-LICENSE-KEY";
String privateKey = "PRIVATE-LICENSE-KEY";
// Initialize the metered license
Metered meteredLicense = new com.aspose.ocr.metered.Metered();
meteredLicense.setMeteredKey(publicKey, privateKey);
Your usage will be recorded locally and regularly reported back to Aspose servers. You will be billed monthly for what you use. This licensing mechanism requires that the computer running the OCR application has a stable Internet connection and that the application is not blocked by a firewall.
Read Metered Licensing FAQ for in-depth technical and business details.
To check the current state of the time limited (file-based) license:
// Initialize the licensing component
com.aspose.ocr.License license = new com.aspose.ocr.License();
// Load the license from file
license.SetLicense("Aspose_OCR_License_File.lic");
// Validate the license
if(License.isValid()) {
System.out.println("The license is valid!");
} else {
System.out.println("The license is invalid!");
}
To check the metered license usage:
// License key pair
String publicKey = "PUBLIC-LICENSE-KEY";
String privateKey = "PRIVATE-LICENSE-KEY";
// Initialize the metered license
Metered meteredLicense = new com.aspose.ocr.metered.Metered();
meteredLicense.setMeteredKey(publicKey, privateKey);
// Remaining license limit
double remainingCalls = meteredLicense.getConsumptionCredit() - meteredLicense.getConsumptionQuantity();
Even if you have a single license for all Aspose products (such as Aspose.Total for Java), you still need to apply the license separately to each Aspose product you are using in your application.
Every Aspose product has a License
class in its namespace. Use the fully qualified License
class name when applying licenses to each product to avoid ambiguity. For example:
// Aspose.OCR
com.aspose.ocr.License ocrLicense = new com.aspose.ocr.License();
ocrLicense.SetLicense("Aspose_OCR_License_File.lic");
// Aspose.BarCode
com.aspose.barcode.License barcodeLicense = new com.aspose.barcode.License();
barcodeLicense.SetLicense("Aspose_BarCode_License_File.lic");
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.