How to call ocr2any.exe from Window Service Using C# source code?


I want to run veryPDF command "..\OCRTool\ocr2any.exe -ocr2 -ocr2excelmode 0 OCRTool\Sales3.pdf _test\Sales3.xls" .

I have tried out a lot of code to run this command in my window service code using c# but not working, kindly provide the piece of code thru which above command can be run using window service application.

Please provide ASAP if it works we are going to buy you product. 


Thanks for your message, you can use VeryPDFComRunCmd COM Component to call ocr2any.exe from your Windows Service code using C# program language, you may download VeryPDFComRunCmd COM Component from this web page to try,

Please look at more information about VeryPDFComRunCmd COM Component from this web page,

Here is the simple project to call ocr2any.exe from C# code using VeryPDFComRunCmd COM Component, we hope it may useful to you,

string strCmd = "D:\\ocr2any.exe -ocr2 -ocr2excelmode 0 D:\\OCRTool\\Sales3.pdf D:\\OCRTool\\Sales3.xls";

System.Type VeryPDFType = System.Type.GetTypeFromProgID("VeryPDFCom.RunCmd");
VeryPDFCom.RunCmd VeryPDFCom = (VeryPDFCom.RunCmd)System.Activator.CreateInstance(VeryPDFType);
string strReturn = VeryPDFCom.RunCmd2(strCmd, 1);
MessageBox.Show("Return:" + strReturn);


VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Verify Code   If you cannot see the CheckCode image,please refresh the page again!