Page 1 of 1

PdfOcrOptions Class

Posted: Wed Apr 29, 2020 3:48 pm
by jloizagah
Hi. Studying GdPicture guides I have found information about GdPicturePDF.PdfOcrOptions here:

https://www.gdpicture.com/guides/gdpicture/Gd ... tions.html

But I have not found the way to use it in the context of modifying the method GdPicturePDF.OcrPages, changing the way GDPicturePDF performs the OCR. Coul you provide us with a single example?.

Best regards.

Re: PdfOcrOptions Class

Posted: Mon Aug 31, 2020 10:41 am
by Fabio
Hi!

You can use it like this:

Code: Select all

PdfOcrOptions pdfOcrOptions = m_DefaultOcrOptions.Clone(PageNo);
pdfOcrOptions.ResourcePath = DictionaryPath;
pdfOcrOptions.Dictionary = Dictionary;
pdfOcrOptions.CharWhiteList = CharWhiteList;
pdfOcrOptions.OCRMode = ocrMode;
pdfOcrOptions.TimeoutMillisec = TimeoutMillisec;
It create a PdfOcrOptions object and set the configuration's parameters.
After, you will be able to pass those parameters in another method like this one:

Code: Select all

public delegate void GdPicturePDF.ExternalOcrPageRequestEventHandler( 
   int ImageID,
   GdPicturePDF.PdfOcrOptions PdfOcrOptions,
   out GdPictureStatus Status,
   out string ResultEncoding,
   out string OcrResult
)
Hope it helps!

Regards,
Fabio de Rose
Solution Engineer