SetLicenseNumberOCRTesseract

Discussions about machine vision support in GdPicture.
Post Reply
ronk
Posts: 10
Joined: Wed Aug 29, 2012 7:53 am

SetLicenseNumberOCRTesseract

Post by ronk » Tue Nov 20, 2012 3:28 am

I have an old Visual Foxpro application that my client wants to upgrade to .net version from GdPicture Toolkit Pro version 5. I have previously received some help and know that I need to do the folllowing to use the .net version :

oGdPictureImaging = CREATEOBJECT("GdPicture9.GdPictureImaging")
oGdPictureViewer = CREATEOBJECT("GdPicture9.GdViewer")
thisform.GdViewer1.SetLicenseNumber("30 day evaluation license")

This works fine and I have benn able to use this line to extract text from pdf documents:

vtextbit=thisform.GdViewer1.PdfGetPageText()

However, the program needs to use OCRTesseract and I am having 2 issues (I am using the latest demo version, downloaded yesterday)

The program previously had:

thisform.olecontrol2.SetLicenseNumberOCRTesseract("xxxxxxxxxxxxxxxxxx")

I have attepted to use the following without sucecss:

oGdPictureImaging.SetLicenseNumberOCRTesseract("30 day evaluation license") - it doesn't recognise the name

The scaning previously said:
thisform.olecontrol2.SetNativeImage(thisform.olecontrol1.GetNativeImag
thisform.olecontrol2.ResetROI
vtextbit = thisform.olecontrol2.OCRTesseractDoOCR(2, lcOcrDir)

and I have changed this to:

vtextbit = oGdPictureImaging.OCRTesseractDoOCR(vimage, "eng", lcOcrDir, "") where vimage is the document name and lcOcrDir is a valid path to the dictionary files.

Could you please give me some advise as my client is anxious to upgrade and I am a bit lost. Thank you in advance.

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: SetLicenseNumberOCRTesseract

Post by SamiKharma » Tue Nov 20, 2012 10:22 am

Hi.

You need to use the RegisterKEY function of the LicenseManager class instead. Here are links to show you how to do it:
https://www.gdpicture.com/guides/gdpicture/v9/html/con ... NET__.html
https://www.gdpicture.com/support-faq.php

Best,
Sami

ronk
Posts: 10
Joined: Wed Aug 29, 2012 7:53 am

Re: SetLicenseNumberOCRTesseract

Post by ronk » Tue Nov 20, 2012 11:43 am

Thank you for your prompt reply. Unfortunately I have zero experience outside Visual Foxpro in any of the supported languages and am not always sure how to convert them.

Do you mean (in Visual Foxpro):

LicMgr = CreateObject("GdPicture9.LicenseManager")
LicMgr.RegisterKEY(MY_PLUGIN_KEY) && with MY_PLUGIN_KEY being the demo key supplied for the 30 day trial
The above runs successfully in the command box of Foxpro.

If that is correct, is my programming re the line:
vtextbit = oGdPictureImaging.OCRTesseractDoOCR(vimage, "eng", lcOcrDir, "") correct?

Running the above line in the command box gives me the message ""OLE error code 0x80004002: No such interface supported."". I am running Visual Foxpro 9.2.

Thank you for your patience.

ronk
Posts: 10
Joined: Wed Aug 29, 2012 7:53 am

Re: SetLicenseNumberOCRTesseract

Post by ronk » Wed Nov 21, 2012 4:39 am

Sorry for the last post - I realise I was using an invalid value for vimage so please ignore that part. I still have an issue but wiil post in the code snippet area.

Thanks.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: SetLicenseNumberOCRTesseract

Post by Loïc » Wed Nov 28, 2012 7:15 pm


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest