How to apply ocr Function to only the first line?

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

How to apply ocr Function to only the first line?

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

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

Post by Tracker Supp-Stefan »

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
Posts: 77
Joined: Fri Jun 08, 2018 1:39 pm

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

Post by Audros »

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

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

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply