Why only 2 pages OCRd?

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: TrackerSupp-Daniel, Tracker Support, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Tracker Supp-Stefan

Post Reply
Posts: 38
Joined: Tue Jan 12, 2016 2:25 am

Why only 2 pages OCRd?

Post by crimsonlogic » Wed Jun 15, 2016 8:44 am

Hi Support,

I am doing the coding for OCR, and found only 2 pages OCRd when I pass an original pdf with more then 2 pages.

Below is the code:

Code: Select all

PDFXOCR_Funcs.PXO_Options Options = new PDFXOCR_Funcs.PXO_Options();
Options.blacklist = string.Empty;
Options.whitelist = string.Empty;
Options.raster_dpi = 300;
Options.ImageFlags = (uint)PDFXOCR_Funcs.OCR_ImageProcessingFlags.OCR_Image_NoRotate;
Options.DataPath = m_Datapath;
Options.lang = m_Language;
Options.RegionMode = PDFXOCR_Funcs.OCR_RegionMode.OCR_Block;
Options.reserved = 0;

IntPtr pxoPagelist = IntPtr.Zero; 

hResult = PDFXOCR_Funcs.OCR_MakeSearchable(pdf, ref Options, pxoPagelist);

if (PDFXOCR_Funcs.IS_DS_FAILED(hResult))
       result += "Error running searchable.\nError code: " + hResult.ToString();
       OCRretcode = hResult.ToString();

hResult = PDFXOCR_Funcs.OCR_SaveW(pdf, m_DestFilename);
if (PDFXOCR_Funcs.IS_DS_FAILED(hResult))
       result += "Error saving output PDF file.\nError code: " + hResult.ToString();
PDFXOCR_Funcs.OCR_Delete(out pdf);

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

Re: Why only 2 pages OCRd?

Post by Tracker Supp-Stefan » Wed Jun 15, 2016 9:11 am

Hello crimsonlogic,

This is a limitation of the trial OCR tool. If you have a valid license (or when you purchase one) - we will supply you with the fully working version of the OCR DLLs that will process more than 2 pages at a time.


Post Reply