This is the code block
Code: Select all
Try
Dim PdfID As Integer = oGdPictureImaging.PdfOCRStart(_FileName, True, "MyApp", Environment.UserName, "", "", "MyApp")
Dim imgID As Integer
For i As Integer = 1 To _imgData.Count
imgID = CInt(_imgData.Item(i))
If Not imgID = 0 Then
Call oGdPictureImaging.PdfAddGdPictureImageToPdfOCR(PdfID, imgID, "eng", _LibPath, "")
oGdPictureImaging.ReleaseGdPictureImage(imgID)
End If
Next
oGdPictureImaging.PdfOCRStop(PdfID)
Catch ex As Exception
MessageBox.Show(ex.Message, "Error Writing PDF.", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try