PdfOcrOptions Class

Discussions about PDF management.
Post Reply
jloizagah
Posts: 29
Joined: Tue Mar 17, 2009 2:45 pm

PdfOcrOptions Class

Post by jloizagah » Wed Apr 29, 2020 3:48 pm

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.

User avatar
Fabio
Posts: 173
Joined: Thu Aug 27, 2020 9:57 am

Re: PdfOcrOptions Class

Post by Fabio » Mon Aug 31, 2020 10:41 am

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest