I have been trying to create searchable pdf from colored scanned pdf file. Following is the code I picked up from this forum-
Code: Select all
PDFid = oGdPictureImaging.PdfOCRStart(strflname, False, "", "", "", "", "")
For i As Integer = 1 To GdViewer1.PageCount
imageid = GdViewer1.PdfRenderPageToGdPictureImage(200, i)
[color=#FF4040] oGdPictureImaging.ConvertTo1Bpp(imageid)[/color]
oGdPictureImaging.PdfAddGdPictureImageToPdfOCR(PDFid, imageid, TesseractDictionary.TesseractDictionaryEnglish, TextBox1.Text, "")
GdViewer1.ReleaseGdPictureImage(imageid)
Next
oGdPictureImaging.PdfOCRStop(PDFid)
Thank you
Charu