How can I call OCR to Any Converter SDK from my C/C++ source code?

Hello,

I went online to buy ocr2any yesterday, as I am not sure about the others so feel I should purchase the OCR as it is the primary piece of kit that I am after and it is working well for me. However, I was distracted by the discovery of your SDK, I had forgotten about it.

I presume it lets me use the library on my own machine but not to distribute any product based upon it, that is in the $1,995 developer licence. I downloaded it, could not find any include files in the SDK, so I take it, it is all done through the compiled headers, but is there a function reference or is it all in the examples? It is C that I am interested in. Are the prices in US dollars, please?

Best wishes.
Customer
------------------------------------------

image

http://www.verypdf.com/app/ocr-to-any-converter-cmd/try-and-buy.html#buy

Thanks for your message, yes, the OCR to Any Converter SDK Developer License is USD1995 per developer license, after you buy it, you can include it into your product and distribute it along with your product to your customer royalty free, you can also use this product on any systems as you want.

OCR to Any Converter SDK Developer License can be called from C/C++ source code, please find a C/C++ example project in "example_C++" folder, you can compile this project to an EXE application, then you can use this C/C++ example to call OCR to Any Converter SDK easily.

Here is a C/C++ example source code to call OCR to Any Converter SDK function,

#include "stdafx.h"
#include <objbase.h>
#include <stdio.h>
#include <tchar.h>
#include <atlbase.h>
#include <stdio.h>
#include <time.h>
#include <io.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include "ocr2anycom.h"

void GetModulePath(char *out_path,char *in_name)
{
    char *p;
    GetModuleFileName(NULL, out_path, 256);
    p =strrchr(out_path,'\\');
    p[1]=0;
    strcat(out_path,in_name);
}
void main()
{
    ::CoInitialize(NULL);

    {
        char szInFile[_MAX_PATH];
        GetModulePath(szInFile, "test_multi_columns.tif");

        char szOutFile[_MAX_PATH];
        GetModulePath(szOutFile, "_test_out.pdf");

        char *lpstrLicenseKey = "-$ XXXX-XXXX-XXXX-XXXX";

        char szCmd[4096] = {0};
        sprintf(szCmd, "-ocrmode 3 %s \"%s\" \"%s\"", lpstrLicenseKey, szInFile, szOutFile);

        try
        {
            _ocr2anyCom VeryPDFCom;
            VeryPDFCom.CreateDispatch("VeryPDF.ocr2anyCom");
            VeryPDFCom.ocr2any(szCmd);
        }
        catch(COleDispatchException* pEx)
        {
            printf("Something is wrong...\n");
        }       
    }

    {
        char szInFile[_MAX_PATH];
        GetModulePath(szInFile, "test_multi_columns.tif");

        char szOutFile[_MAX_PATH];
        GetModulePath(szOutFile, "_test_out.rtf");

        char *lpstrLicenseKey = "-$ XXXX-XXXX-XXXX-XXXX";

        char szCmd[4096] = {0};
        sprintf(szCmd, "-ocr2 %s \"%s\" \"%s\"", lpstrLicenseKey, szInFile, szOutFile);

        try
        {
            _ocr2anyCom VeryPDFCom;
            VeryPDFCom.CreateDispatch("VeryPDF.ocr2anyCom");
            VeryPDFCom.ocr2any(szCmd);
        }
        catch(COleDispatchException* pEx)
        {
            printf("Something is wrong...\n");
        }       
    }
}

In order to call "VeryPDF.ocr2anyCom" from your C/C++ source code, you need register ocr2anyCom.exe into your system with administrator privilege first, for example,

REM -------------------------------------------
REM Please run a cmd window by administrator privilege, and then run following command line
REM -------------------------------------------

ocr2anyCom.exe /regserver

You can also run "install.vbs" from "libs" folder to register ocr2anyCom.exe into your system, "install.vbs" will use administrator privilege to register ocr2anyCom.exe automatically.

Yes, the price is in US Dollar, if you need it, you may purchase it from this web page directly,

http://www.verypdf.com/app/ocr-to-any-converter-cmd/try-and-buy.html#buy

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!