Home : Optical Character Recognition (OCR) : Glyphreader : Server OCR with GlyphReader
Q10202 - HOWTO: Server OCR with GlyphReader

The best way to OCR on a server is to create a Windows Service that will process images as they are added to a database or directory.  You can use the FileSystemFolderWatcher component or a timer to view new files as they are added to a specific folder. 

GlyphReader is restricted in the number of concurrent processes (or threads) by the number of licenses purchased.  Each server license allows for a maximum of 20 threads (your number of licensed threads depends on your license agreement - licenses are sold with 5,10,15, or 20 threads).  The ThreadPool class in the .NET Framework is great at limiting the number of OCR processes by the number of cores/CPU's on your server, or the number of licenses you have.

NOTE: SDK licenses for GlyphReader are limited to 1 thread/instance, and so you must be running under a server license in order to run/test multiple threads

Do not reference Atalasoft.dotImage.Ocr.GlyphReader.dll in your ASP.NET web application, because you will not be able to compile with the error "The specified module could not be found. (Exception from HRESULT: 0x8007007E)". 

If you need to OCR directly from an ASP.NET application, considering saving an XML file containing a unique GUID and a file link to the image file.  Then have your windows service pick up this new XML file as a job ticket.  Let the ThreadPool do it's work by passing in the image referenced in the job ticket into the Thread Pool and saving the resulting OCR'ed file with the unique GUID filename.  By watching the output folder, you will be able to report back to the user once the job is complete by matching the unique GUID in the job ticket with the output filename.

This ensures you have full control over thread count .. if you try and service incoming web requests with direct OCR, and you get more than you're licensed for at once, you can end up throwing license exceptions




Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?


Tell us why you rated the content this way. (optional)
Approved Comments...
No user comments available for this article.

Powered By InstantKB.NET v1.3
Copyright © 2002, 2019. InstantASP Ltd. All Rights Reserved