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

Team,

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. 

Customer
------------------------

image
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,

http://www.verydoc.com/exeshell.html#VeryPDFComRunCmd_COM_Component
https://www.verypdf.com/dl2.php/VeryPDFComRunCmd.zip

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

http://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

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);
------------------------

VeryPDF

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!