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

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

Why only 2 pages OCRd?

Post by crimsonlogic »

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();
}
else
{
       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: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Why only 2 pages OCRd?

Post by Tracker Supp-Stefan »

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.

Regards,
Stefan
Post Reply