With Puma.NET recognition can be as simple as the following lines of code: var pumaPage = new PumaPage("page001.jpg"); using(pumaPage) { pumaPage.FileFormat pumaPage.FileFormat = PumaFileFormat.RtfAnsi; PumaFileFormat.RtfAnsi; pumaPage.na!lepeller pumaPage.na! lepeller = false; pumaPage.#anguage pumaPage.#anguage = Puma#anguage.nglis$; Puma#anguage.nglis$;
pumaPage.Re%ogni&e'oFile("page001.rtf");
You can either download a setup package (.msi file) that contains binar files and reference documentation in order to faster tr Puma.NET or ou ma download the entire !isual "tudio #$$% solution containing source codes of the pro&ect. The below description gi'es ou the general information on Puma.NET and how ou can gain it in our .NET applications. Puma.NET Runtime Components:
. Puma.Net. Puma.Net.dll dll class librar librar that contains contains the classes classes (actuall (actuall one essential essential * PumaPage) PumaPage) that should be used in our application to gain +,- functionalit #. ,unei/orm ,unei/orm binar binar files files (Puma (Puma ,+01 233s1 233s1 2ictionar 2ictionaries ies etc.) the the underlinin underlining g recognition engine b ,ogniti'e Technologies 4. puma.interop.dll interoperation assembl consumed b Puma.Net.dll in order to marshal operation calls to Puma ,+0 "er'er 5. dibapi.dll nati'e nati'e Win4# 233 that contains functions necessar to work work with data structures that Puma ,+0 and puma.interop.dll consume. This librar should be accessible to the application referencing Puma.Net.dll. "olution (source codes) contains merge module (msm) pro&ect holding all necessar runtime components that ou ma include in an 0" deploment pro&ect. 6t will ease redistribution of +,- components with de'eloped applications. Installing and using Puma.NET
7fter downloading and installing the deploment pro&ect PumaNet.msi the target folder will be of the following contents:
•
7ssemblies folder contains files Puma.Net.dll1 puma.interop.dll1 dibapi.dll these three files are to be accessible to the e8ecutable referencing Puma.Net.dll
•
,+0 "er'er folder contains binar files of ,unei/orm recognition engine (as well as Puma ,+0 "er'er file apuma.dll). ,+0 ser'er is automaticall registered during installation
•
,+0 "er'er9-egister folder contains batch files that allow to manuall registerunregister ,+0 ser'er
•
;elp folder contains PumaNET.chm with generated reference documentation on class es of Puma.Net.dll. 6t also contains other documentation files (like getting started ou are reading)
•
"ample folder contains sample Windows /orms application (with source codes) using Puma.NET.
7t first ou ma re'iew the sample application that demonstrates +,- capabilities of Puma.NET.
7ssemblies Puma.Net.dll and puma.interop.dll are strong named and can be put to <7, dibapi.dll can be placed in folder Windows9"stem4# 6f the abo'e conditions are true it=s not necessar for those files abo'e to be in the same folder as consuming application.
Puma.NET classes
7s ou can see the class model is simple: . PumaPage the main class that processes a single image (a page) and produces recognition results in a form of a file or a string 'alue. 0ost recognition parameters (language1 output format etc.) are set 'ia public properties of this class. #. Puma/ont"ettings the class groups recognition parameters regarding fonts (boldness1 underline1 font names to produce output etc.). 4. Puma3anguage1 Puma/ile/ormat enumerations for corresponding properties in PumaPage. 5. 6PumaE8tension classes implementing this interface can be aggregated within PumaPage in order to e8tend its functionalit. >. -ecognitionProgressE'ent;andler1 -ecognitionE'ent7rgs1 -ecognitionE8ception maintaining recognition e'ents and special errors. "tring literals issued b classes in this assembl are stored in resources thereb can be easil locali?ed.