10

I just bought abbyy finereader 11 copr to rund it from another programm, but i cant find any commends to be used for finereader.exe. so without any commands it simply openens and scans but i need to tell it where to save the document and how to name and the to close the app again, also it would be cool to have it as a background task.

user1748357
  • 101
  • 1
  • 1
  • 4

5 Answers5

20

While doing my OCR research project, found one. Works with FR12, didn't tested with earlier versions.

FineCmd.exe PRESS2.TIFF /lang Mixed /out C:\temp\result.txt /quit 

general command line:  <open_keys/scanning> [<recognition_keys>] [<export_keys>] 

  <open_keys/scanning> ::= ImageFiles | /scan [SourceName] | /file [filename1 filename2], where
    ImageFiles - list of files for recognition
    SourceName - images source (scanner); if not specified, current is used
    filename.. -  list of files for recognition

  <recognition_keys> ::= [/lang Language] [/optionsFile OptionsFileName], where
    Language - name of language in English (russian, greek, Mixed)
    OptionsFileName - path to options file

  <export_key> ::= /out ExportFile | /send Target, where
    ExportFile - name of file with extension to save file to
      (txt, rtf, doc, docx, xml, htm(l), xls, xlsx, ppt, pptx, pdf, dbf, csv, lit); 
    Target - name of target app where to open
      (MSWord, MSExcel, WordPro, WordPerfect, StarWriter, Mail, Clipboard, WebBrowser, Acrobat, PowerPoint)

This command opens FR ui, processes the file and then closes it (if you pass argument /quit). FineCmd.exe located in FR directory where you installed it

sancheese
  • 332
  • 2
  • 8
  • Could you give an example of an OptionsFile? – Diana Jan 23 '17 at 05:56
  • OptionsFile is the batch.options.xml file you get in a FR document folder. There unfortunately seems to be a bug (at least in FR12): custom patterns _are_ saved in the xml file, but are not loaded by FR. – alephreish Jul 28 '17 at 09:46
  • For me (FineReader 12) this opens the UI with the input file but does not perform the OCR, save the file or quit. I have to complete the save/quit manually. Is there any documentation on other options to the command? – Jim Garrison May 02 '18 at 00:41
  • @JimGarrison you should check your settings in FineReader app, it should be set to do OCR automatically when document was opened – sancheese May 02 '18 at 03:15
  • 1
    For all looking for this **batch.options.xml** that can be used with finecmd.exe, to find it you have to save in the FineReader OCR editor an OCR project, in the saved project folder you will find the above mentioned XML. I have tested finecmd.exe on FR 15 and can confirm it's working fine. The command is used was `finecmd.exe file.pdf /lang English /optionsFile OptionsFileName.xml /out file.pdf` and it worked even on FR 15. **Note:** Whatever settings you set in FR OCR editor and saved to the project folder will be what FineCMD.exe will use. – Yeahish Mar 12 '20 at 12:54
  • Thank u @Yeahish. Also people should know that project file is a folder for CMD, so u can get `batch.options.xml` using shell commands (`cd`/`cp`/`mv`) – Demetry Pascal Oct 25 '21 at 18:40
6

Hello I saw this msg very late but i m using ABBYY command line for 10years .

I prefer ABBYY 8 because makes same good job faster and does not open any GUI . It comes with FineOCR.exe:

"C:\...\ABBYY FineReader 8\FineOCR.exe" %1 /lang greek english /send MsWord

It does OCR and opens MsWord . FineOCR.txt is a simple help file.

Regarding ABBYY 11,12 (all versions) there is a FineCmd.exe . Using something like:

"c:\...\FineReader\FineCMD.exe" %1 /lang greek english /send MsWord 

does what FineOCR did before (but no .txt help file)

Mic X
  • 131
  • 2
  • 2
  • what command line argument should i use to save the MsWord file?? – Nwawel A Iroume Dec 18 '15 at 07:56
  • FineCmd.exe does nothing, it just opens the GUI in version 12. – Howie Mar 07 '16 at 10:27
  • Hello, I use this .bat for FR12: "c:\Graph\ABBYY FineReader 12\App\FineReader\FineCMD.exe" %1 /lang greek english /send MsWord It works *fine* !. Mike – Mic X Mar 09 '16 at 04:27
  • This .bat opens MsWord and insert the text (silent OCR operation - no OCR GUI) , but it does not save it automatically ... – Mic X Mar 09 '16 at 12:24
  • @MicX Hello! U said u r using ABBYY command line for 10years. Help me, where can I see a list of available commands for like some image prepations params and so on? [here](https://help.abbyy.com/en-us/finereader/15/user_guide/commandline_save/) I saw examples with these commands but I cannot find all available commands list – Demetry Pascal Oct 25 '21 at 17:37
  • https://help.abbyy.cn/en-us/finereader/15/user_guide/commandline_save – Mic X Oct 26 '21 at 20:40
4

Unfortunately, Such a professional OCR software doesn't support command line utilities. For batch processing, it offers HOT FOLDER utility inside it (from GUI). http://informationworker.ru/finereader10.en/hotfolder_and_scheduling/installandrun.htm

If you want to make OCR batch processing from your program, they sell another software, called 'ABBYY Recoginition Server'.

There also offer a comprehensive API for programmers : http://www.abbyy.com/ocr_sdk_windows/technical_specifications/developer_environment/

If your plan is to batch process them and write the contents to a Database, you can also do a programmatical trick to overcome such limitation, as I did recently in one of my projects (It is a bit offline-way but it is simple and works) : While parsing the files and putting them to your Database table from your program, move (or copy) them all into a folder while changing their filename to include an ID from your Database table. Then use 'hot folder' utility to OCR all files, by having the same filename with TXT extention (It is set from 'hot folder' settings). Then in your program parse the folder's text files, get their content as string, and parse the table IDS from filename, the rest is updating your table with that information.)

Ali VELI
  • 138
  • 1
  • 7
  • Please do a little more research, as you can see in [this answer](https://stackoverflow.com/a/36059888/10830217) and notes it is perfectly possible to convert files using FR OCR using the CMDline. – Yeahish Mar 12 '20 at 12:59
2

An year later, ABBYY does support command line usage: http://www.ocr4linux.com/en:documentation

antitoxic
  • 3,746
  • 1
  • 37
  • 46
2

Version 14 does not save the output file using:

FineCmd.exe PRESS2.TIFF /lang Mixed /out C:\temp\result.txt /quit

or

FineCmd.exe PRESS2.TIFF /lang Mixed /out C:\temp\result.txt

Versions 11 & 12 work well using the above commands (does save the output) but does display the GUI which can be closed using /quit.

Versions 9 & 10 don't come with FineCmd.exe or FineOCR.exe.

Version 8 can OCR and send the output to an application of choice but cannot save using /out. In my experience it does open the GUI.

Ivan
  • 61
  • 7
  • I'm able to use within ABBYY FineReader 14, you statement wrong. – Mr Hoelee May 05 '19 at 16:04
  • Ivan I can confirm that. This does not work with FineReader 14. @LeeTeongHoe could you share the command you are using ? Does the output get saved correctly on FR 14 ? – niranjan94 May 06 '19 at 12:00
  • "C:\Program Files (x86)\ABBYY FineReader 14\FineCmd.exe" “C:\SomePath\File\OCR\test.png” /lang Mixed /out "C:\SomePath\File\OCR\result.txt" /quit – Mr Hoelee May 07 '19 at 09:01
  • I even created SpringBoot webapp to OCR images upload via browser, no issue until now... – Mr Hoelee May 07 '19 at 09:02