Page 1 of 1

Why only 2 pages OCRd?

Posted: Wed Jun 15, 2016 8:44 am
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);

Re: Why only 2 pages OCRd?

Posted: Wed Jun 15, 2016 9:11 am
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