i am scanning a document which is in Hindi language
and i want to save it as a pdfocr.
My code:
Code: Select all
IntPtr ObjIntPtr = (IntPtr)hdib;
string ocrPath = AppDomain.CurrentDomain.BaseDirectory.ToString() + "\\OCR";
int pdf_ImagePointer = ObjGdPictureImaging.CreateGdPictureImageFromDIB(ObjIntPtr);
//for converting scanned pdf to pdf ocr
ObjGdPictureImaging.SaveAsPDFOCR(pdf_ImagePointer, p_FileName, "hin", ocrPath, "", true, "", "", "", "", "");
//ObjGdPictureImaging.SaveAsPDF(pdf_ImagePointer, p_FileName, true, "", "", "", "", "");
ObjGdPictureImaging.ReleaseGdPictureImage(pdf_ImagePointer);
i have downloaded "hin.traineddata" from gdpicture website
but i am getting error as:
plz reply asapAttempted to read or write protected memory. This is often an indication that other memory is corrupt.