Hi,
Hi Chandu,
Thank you for using Aspose products, and welcome to Aspose.OCR support forum.
We have recently published latest version of Aspose.OCR for Java 1.7.0 with improved memory utilization and several other enhancements. As you are using an older version (1.5.0) therefore we would suggest you to download the latest build (link shared above) and its corresponding resource file in order to check if you still can reproduce the said exception.
In case the problem persists, we would request you to share the sample image for detailed investigation and correction purposes. Please feel free to write back if you face any difficulty.
Hi
Hi Chandu,
Thank you for writing back.
I have used your provided code to successfully perform OCR operation on a sample of my own (attached). Problem could be the sample it self so I would request you to please provide the sample image so we could investigate the problem in more detail. Moreover, please note that Aspose.OCR for Java currently supports BMP and TIFF file formats. Other image formats (including PNG) are not supported at the moment.
Hi,
Hi Chandu,
We are sorry for your inconvenience.
We are currently looking into the exception message to suggest a solution. In the meanwhile, please provide your environment details such as Operating System, Service Pack, JDK version etc. As soon as we get these details, we will try to simulate the environment on our to replicate the exception.
On a similar note, could you please try extracting the Resource archive to make sure the downloaded package isn’t corrupt/damaged.
Hi,
Hi Chandu,
Thank you for providing the environment details. We are moving forward to setup Linux Fedora 20 (18 isn’t available for download) on our end in order to further investigate the problem cause. Moreover, a ticket (OCR-33694) has been logged in our bug tracking system to get an insight of the exception “Error occurred during recognition.FontFamily Arial not found Parameter name: Arial”.
We will keep you posted with updates in this regard. Please accept our sincere apologies for the inconvenience caused.
Hi Chandu,
Thank you for your patience with us.
We have evaluated your presented scenario on Linux Fedora 20, and was able to replicate the said exception. The said exception is due to the reason that Aspose.OCR for Java API did
not find the required font(s) therefore it threw an error
mentioning the font used in the sample image. Please note, Linux distributions such as Fedora does not include any Microsoft TrueType fonts (TTFs) by default, whereas Aspose.OCR for Java requires these fonts to be installed on the machine where OCR operation has to be performed.
Please follow the instructions provided below to install the Microsoft TTFs package including the following font-families:
- Andale Mono
- Arial Black/Arial (Bold, Italic, Bold Italic)
- Comic Sans MS (Bold)
- Courier New (Bold, Italic, Bold Italic)
- Georgia (Bold, Italic, Bold Italic)
- Impact
- Tahoma
- Times New Roman (Bold, Italic, Bold Italic)
- Trebuchet (Bold, Italic, Bold Italic)
- Verdana (Bold, Italic, Bold Italic)
- Webdings
Step-1: Make sure you have the following rpm-packages installed.
- rpm-build
- If not previously installed, use the command yum install rpm-build cabextract ttmkfdir
- wget
- If not previously installed, use the command yum -y install wget
Step-2: Download the latest msttcorefonts spec file from SourceForge using the command as follow,
wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec
Step-3: Build a RPM file using the previously downloaded spec file and the following command,
rpmbuild -ba msttcorefonts-2.5-1.spec
Step-4: The RPM file will be stored in: /root/rpmbuild/RPMS/noarch/, install it as follow,
rpm -ivh /root/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm
You are all done, just restart the machine to make changes take effect. Re-run your previously provided code and it will be able to exhibit the desired results.
Hi Chandu,
Just to keep you informed that we have closed the ticket logged earlier as OCR-33694 because the behavior presented in this ticket is not a bug on the part of Aspose.OCR for Java API, rather the issue is related to the configuration of fonts in the development environment. Please feel free to contact us anytime if you have any concerns or questions regarding Aspose APIs.
The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.