I'm trying to use the OCR plugin to convert the multipage TIFFs we create while scanning into OCR'd PDFs. This is working well when we scan in files with a standard orientation, but we sometimes need to scan in a way that the text is rotated 90 degrees. When we try to OCR these, only a few random characters are identified.
Is it possible to have rotated pages be OCR'd while keeping the scanned rotation? I'm currently using the following code for our OCR:
Code: Select all
private static GdPictureImaging imaging = new GdPictureImaging();
private static string imageDictionaryDirectory = @"{Path to Dictionary}";
public static bool OcrTiffToPdf(string inputFile, string outputPdf)
{
var imageID = imaging.CreateGdPictureImageFromFile(inputFile);
if (imaging.GetStat() == GdPictureStatus.OK)
{
string ocr = imaging.PdfOCRCreateFromMultipageTIFF(imageID, "eng", imageDictionaryDirectory, String.Empty,
outputPdf, true, String.Empty, String.Empty, String.Empty, String.Empty, String.Empty);
imaging.ReleaseGdPictureImage(imageID);
if (String.IsNullOrWhiteSpace(ocr))
{
return false;
}
}
if (imaging.GetStat() != GdPictureStatus.OK)
{
return false;
}
return true;
}