Errors when using OCR within VB6 but not PDFX-Change Viewer

PDF-X OCR SDK is a New product from us and intended to compliment our existing PDF and Imaging Tools to provide the Developer with an expanding set of professional tools for Optical Character Recognition tasks

Moderators: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Tracker Supp-Stefan

Post Reply
whoit
User
Posts: 271
Joined: Tue Jul 07, 2015 3:30 pm

Errors when using OCR within VB6 but not PDFX-Change Viewer

Post by whoit » Tue Jul 07, 2015 4:14 pm

I've installed and tested OCR using PDFX-Change Viewer v2.5 build 313.1 (Windows 7 64 bit OS)
and for my 13 sample file the results have been excellent.

However, when I use the Example VB6 code (PDF-XChange PRO 5 SDK\Examples\OcrSDKExamples\VB6 Example)
most, but not all of the same files fail with this error:

"Make searchable failed -1039334424"

(Due to IP restrictions I cannot send any of my samples - sorry)

The VB sample is using the 32-bit dll.

I've also tried using the included OCRtestapp.exe which generates this error:
"OCR_MakeSearchable() failed. Have you set the language input file directory properly in OCR->Settings?"
(Answer: yes I have - I can see 4 languages in the settings interface)

And the included OcrDelphiExample.exe which generates this error:
"Make searchable failed 0x820A2717"

I'm a bit confused why the same file OCR would work in the Free Viewer but not in the SDK?

(Note: I do not have a license for the SDK - I am using it as a trial)

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13316
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Errors when using OCR within VB6 but not PDFX-Change Vie

Post by Tracker Supp-Stefan » Tue Jul 07, 2015 4:43 pm

Hello whoit,

Please make sure that you have both the ocrdats folder (with your languages inside) - you can e.g. copy it from C:\Program Files\Tracker Software\PDF-XChange PRO 5 SDK\Examples\OCRLanguages
and the ocrtools.dll in the same folder and then the sample projects will work correctly (they do for me).

So if you are just testing - copy the ocrdats folder with all of it's languages from .\Examples\OCRLanguages and paste it in .\Examples\Bin and then the OCRtestapp.exe sample app in the same bin folder will work properly without even touching it's settings.

Regards,
Stefan

whoit
User
Posts: 271
Joined: Tue Jul 07, 2015 3:30 pm

Re: Errors when using OCR within VB6 but not PDFX-Change Vie

Post by whoit » Tue Jul 07, 2015 5:09 pm

I'll give that a try and post back.

But in the meantime, how could that cause some documents to ocr and others to error?

EDIT: Nope-didn't solve the problem - behavior is the same - some files ocr fine, others do not.
All of them work in the Viewer....

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Re: Errors when using OCR within VB6 but not PDFX-Change Vie

Post by John - Tracker Supp » Tue Jul 07, 2015 5:58 pm

Hi,

Unfortunately we are going to be unable to help unless we can get at least a file or 2 that fails the process so we can try and trace back to a specific issue ...

Can you possibly email some examples to us at support@tracker-software.com with a link back to this forum post for reference ?

Thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

whoit
User
Posts: 271
Joined: Tue Jul 07, 2015 3:30 pm

Re: Errors when using OCR within VB6 but not PDFX-Change Vie

Post by whoit » Tue Jul 07, 2015 6:23 pm

Unfortunately these documents are not my IP and I had to sign an NDA to get them from my client, so I cannot send them to you.

Certainly there must be other ways to determine why the View OCR works but the dev dll does not?

Maybe I can start by checking each dll's specs - size, date, version, etc.?

Where is the ocr dll installed for the Viewer?

whoit
User
Posts: 271
Joined: Tue Jul 07, 2015 3:30 pm

Re: Errors when using OCR within VB6 but not PDFX-Change Vie

Post by whoit » Tue Jul 07, 2015 6:48 pm

OK - I've done a bit more testing.

First, I used PDF-XChange PRO 5 SDK\DSErrorLookup.exe and entered the error from my first post (-1039334424)
and got back:
Severity: Failure
Facility: Frame buffer
Description: Insufficient memory

Then I re-ran "ocrtestapp.exe" and tried a file - it failed.
I changed the ocr setting for DPI from 300 to 150 - it worked.
I changed back to 300 - it failed.

I then ran the same image through the PDF-XChange Viewer set to 300 dpi, accuracy High - and it worked.

So - why do I apparently experience memory errors from within the sample exe's and not the Viewer?

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Re: Errors when using OCR within VB6 but not PDFX-Change Vie

Post by John - Tracker Supp » Tue Jul 07, 2015 7:07 pm

Hi,

It does appear there is some issue in regards memory allocation that occurs with the specific images being used - but without the actual samples we are a not really in a position to assist as there are so many variables potentially without the images we can pinpoint if and where these may occur.

So we really will need some samples to take this further I am afraid.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

whoit
User
Posts: 271
Joined: Tue Jul 07, 2015 3:30 pm

Re: Errors when using OCR within VB6 but not PDFX-Change Vie

Post by whoit » Tue Jul 07, 2015 7:28 pm

OK, I've found a generic file that causes the same memory errors - I have emailed it to support, referencing this post.

Thank You.

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Re: Errors when using OCR within VB6 but not PDFX-Change Vie

Post by John - Tracker Supp » Tue Jul 07, 2015 9:26 pm

Thanks - also - in the interim, one of developer support staff advises;

Please try Low or Medium level of accuracy.
Internally Accuracy level - is the useage of two different low-level engines (called Tesseract and Cube)

Low=Tesseract only
Middle = Cube only
High = Tesseract + Cube

Further, a full colored image will obviously be larger than grayscale or even black/white.
and this is not optimized in the current older style SDK - but will be in our Core API SDK released soon.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Post Reply