Page 1 of 1

How to apply ocr Function to only the first line?

Posted: Thu Oct 25, 2018 2:36 pm
by Audros
Hello,
we have a question about how to apply ocr Function to only the first line?
my code is belloew:
PDFXOCR.PDFXOCR_Funcs.PXO_Options Options = new PDFXOCR.PDFXOCR_Funcs.PXO_Options();
Options.blacklist = "";
Options.whitelist = "";
Options.raster_dpi = m_DPI;
Options.ImageFlags = (uint)PDFXOCR.PDFXOCR_Funcs.OCR_ImageProcessingFlags.OCR_Image_FastAutorotate;
Options.DataPath = m_Datapath;
Options.lang = m_Language;
Options.RegionMode = PDFXOCR.PDFXOCR_Funcs.OCR_RegionMode.OCR_Line;
Options.SecondLanguage = 0;
Options.reserved = 0;
IntPtr pxoPagelist = IntPtr.Zero; // null pointer passed to OCR_MakeSearchable() will result in all pages being OCRd.


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

thank you

Re: How to apply ocr Function to only the first line?

Posted: Thu Nov 01, 2018 11:27 am
by Stefan - PDF-XChange
Hello Audros,

Just spoke with a colleague in the OCR SDK team - and he says that this is not currently possible, unless you know the exact coordinates of that first line (e.g. if the documents are the same type/format and you know where text starts).

Regards,
Stefan

Re: How to apply ocr Function to only the first line?

Posted: Wed Nov 07, 2018 8:52 am
by Audros
Hello Sir,
thanks :)

Re: How to apply ocr Function to only the first line?

Posted: Wed Nov 07, 2018 8:54 am
by Sasha - PDF-XChange
:)