OCR ocx only saving first two pages

Discussion for the End User use of OCR in PDF-XChange Editor and Viewer

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

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

OCR ocx only saving first two pages

Post 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
Attachments
Document compatibility check.pdf
(95.01 KiB) Downloaded 207 times
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17823
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: OCR ocx only saving first two pages

Post 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
whoit
User
Posts: 269
Joined: Tue Jul 07, 2015 3:30 pm

Re: OCR ocx only saving first two pages

Post 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?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17823
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: OCR ocx only saving first two pages

Post 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
whoit
User
Posts: 269
Joined: Tue Jul 07, 2015 3:30 pm

Re: OCR ocx only saving first two pages

Post by whoit »

OK - thanks. I've passed the email on to our Tech.

I'll post back when we have word on success/failure.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: OCR ocx only saving first two pages

Post by Will - Tracker Supp »

:)
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

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
whoit
User
Posts: 269
Joined: Tue Jul 07, 2015 3:30 pm

Re: OCR ocx only saving first two pages

Post by whoit »

Success!

Changing the dll files worked - thanks!
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: OCR ocx only saving first two pages

Post by Will - Tracker Supp »

:D
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

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
Post Reply