Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, December 4, 2017 11:14:59 AM(UTC)
Duncan Quirk

Groups: Registered, Tech Support, Administrators
Posts: 70

Was thanked: 4 time(s) in 4 post(s)

The LEADTOOLS CloudServices RecognitionEngine interface provides a high-level method to extract passport information from a file. The ExtractPassport method returns a dictionary containing all of the information that was extracted from the input stream.

Code:

         var inputStream = File.Open(@"leadtools.pdf", FileMode.Open);
         LoadDocumentOptions loadOptions = new LoadDocumentOptions()
         {
            FirstPageNumber = 1,
            LastPageNumber = 1
         };

         RecognitionEngine recognitionEngine = new RecognitionEngine();
         IOcrEngine engine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD, false);
         engine.Startup(null, null, null, @"path/to/OCR Bin Directory");

         var licenseInformation = recognitionEngine.ExtractPassport(inputStream, loadOptions, engine, null);
         foreach(var info in licenseInformation)
         {
            Console.WriteLine("Key:" + info.Key);
            Console.WriteLine("Value:" + info.Value);
            Console.WriteLine();
         }

Edited by user Friday, December 29, 2017 4:30:28 PM(UTC)  | Reason: Not specified

Duncan Quirk
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.060 seconds.