Merge pull request #13 from greenshot/feature/BUG-1884_ocr_trailing_blank_spaces

Fix for BUG-1884, added a trim call for the scanned text
This commit is contained in:
jklingen 2016-03-24 22:18:52 +01:00
commit 5201009920
2 changed files with 9 additions and 1 deletions

View file

@ -40,7 +40,12 @@ namespace GreenshotOCRCommand {
modiDocument.OCR(language, orientimage, straightenImage);
IImage modiImage = modiDocument.Images[0];
ILayout layout = modiImage.Layout;
Console.WriteLine(layout.Text);
if (layout.Text != null)
{
// For for BUG-1884:
// Although this is done in the OCR Plugin, it does make sense in the command too.
Console.WriteLine(layout.Text.Trim());
}
modiDocument.Close(false);
return 0;
}