Page 1 of 1

OCR ocx only saving first two pages

Posted: Mon Sep 14, 2015 4:59 pm
by whoit
We're testing the new OCR ocx and finding that only the first two pages of a document get saved, even though
it appears to process all of them.

In the free viewer, the output is always complete, just not via the ocx.

I've attached a 3-page sample document that correctly OCRs in the free viewer (PDFXchange viewer - 2.5 build 313.1)
but only produces 2 pages of output via the ocx.

Here's the basic VB6 code we're using:

Call OCR_Init(doc, PDFREGKEY, PDFDEVCODE)

res = OCR_LoadA(doc, tbInput.Text)
If IS_DS_FAILED(res) Then
MsgBox "Failed to load pdf file"
Exit Sub
End If

SetCallback doc

Dim options As PXO_Options
options.blackList = ""
options.whiteList = ""
options.ImageFlags = OCR_Image_Autorotate
options.lang = PXO_English
options.raster_dpi = 200
options.RegionMode = OCR_Auto
options.DataPath = StrConv(tbData.Text, vbUnicode)
options.accMode = 0

res = OCR_MakeSearchable(doc, options, 0)

If IS_DS_FAILED(res) Then
MsgBox "Make searchable failed " & Str(res)
Else
OCR_SaveA doc, tbOutput.Text
'MsgBox "Complete", vbInformation, "Test OCR"
ShellExecute hwnd, "open", "C:\Program Files\Tracker Software\PDF-XChange PRO 5 SDK\Examples\OcrSDKExamples\VB6 Example\" & tbOutput.Text, _
vbNullString, vbNullString, 0
End If

OCR_Delete doc

Re: OCR ocx only saving first two pages

Posted: Tue Sep 15, 2015 4:30 pm
by Tracker Supp-Stefan
Hello whoit,

This is a limitation of the Trial OCR tool included with the sample projects of the SDK. Once you get a valid Pro SDK license - email us to sales@pdf-xchange.com with your order number and we will give you instructions how to get the live OCR dlls that will process all pages (just like the free Viewer does).

Regards,
Stefan

Re: OCR ocx only saving first two pages

Posted: Wed Sep 16, 2015 1:39 pm
by whoit
Hi Stefan -
Thanks for replying - we are using a licensed Pro version.

Order #: U6721399202

Do we need more than one license key within our code for handling OCR plus the other components?

Re: OCR ocx only saving first two pages

Posted: Wed Sep 16, 2015 3:44 pm
by Tracker Supp-Stefan
Hello whoit,

No you do not need a separate license - just a different version of the OCR dll files.
I've just e-mailed you and Shawn with a link to the correct download.

Regards,
Stefan

Re: OCR ocx only saving first two pages

Posted: Wed Sep 16, 2015 4:12 pm
by whoit
OK - thanks. I've passed the email on to our Tech.

I'll post back when we have word on success/failure.

Re: OCR ocx only saving first two pages

Posted: Wed Sep 16, 2015 4:12 pm
by Will - Tracker Supp
:)

Re: OCR ocx only saving first two pages

Posted: Fri Sep 18, 2015 6:42 pm
by whoit
Success!

Changing the dll files worked - thanks!

Re: OCR ocx only saving first two pages

Posted: Fri Sep 18, 2015 8:12 pm
by Will - Tracker Supp
:D