PDF-XChange - Tracker PDF Viewer - TIFF-XChange - Image-XChange - XMF-XChange - Raster-XChange - Support

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

 
Audros
User
Topic Author
Posts: 33
Joined: Fri Jun 08, 2018 1:39 pm

How to apply ocr Function to only the first line?

Thu Oct 25, 2018 2:36 pm

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

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

Thu Nov 01, 2018 11:27 am

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
 
Audros
User
Topic Author
Posts: 33
Joined: Fri Jun 08, 2018 1:39 pm

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

Wed Nov 07, 2018 8:52 am

Hello Sir,
thanks :)
 
User avatar
Sasha - Tracker Dev Team
User
Posts: 3554
Joined: Fri Nov 21, 2014 8:27 am
Contact:

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

Wed Nov 07, 2018 8:54 am

:)
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Who is online

Users browsing this forum: No registered users and 2 guests