OCR: Value cannot be Null
Parameter name: PTR
The PDF is created, but no OCR
However, if I compile it and run the resulting executable, it works fine, and the PDF is created with OCR.
Code:
Code: Select all
Private Sub gdnet_Click()
Dim PDF As New GdPicture_NET.GdPictureImaging
PDF.SetLicenseNumber ("replaced")
PDF.SetLicenseNumberOCRTesseract ("replaced")
Dim imageid As Long
Dim imagepath As String
imagepath = App.Path & "\sp.tif"
imageid = PDF.CreateGdPictureImageFromFile(imagepath)
Debug.Print PDF.SaveAsPDFOCR(imageid, App.Path & "\sp.pdf", TesseractDictionary_TesseractDictionaryEnglish, App.Path & "\ocr", "", True, "", "", "", "", "")
PDF.ReleaseGdPictureImage (imageid)
End Sub
usage: regasm GdPicture.NET.dll /codebase /tlb