/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
using Greenshot.Interop;
using GreenshotOCR;
namespace GreenshotOCRCommand.Modi {
///
/// The MODI Document object represents an ordered collection of document images saved as a single file.
/// You can use the Create method to load an existing MDI or TIF file, or to create an empty document that you can populate with images from other documents.
/// The OCR method performs OCR on all pages in the document, and the OnOCRProgress event reports the status of the operation and allows the user to cancel it.
/// The Dirty property lets you know whether your document has unsaved OCR results or changes.
/// The SaveAs method allows you to specify an image file format and a compression level.
/// You can also use the PrintOut method to print the document to a printer or a file.
///
[ComProgId("MODI.Document")]
public interface IDocument : ICommon {
///
/// Closes the document.
///
///
void Close(bool saveCall);
///
/// The document's collection of pages.
///
IImages Images
{
get;
}
///
/// Occurs periodically during an optical character recognition (OCR) operation. Returns the estimated percentage of the OCR operation that is complete, and allows the user to cancel the operation.
///
// event OnOCRProgress { get; }
///
/// Indicates whether the active document has unsaved changes.
///
bool Dirty { get; }
///
/// Creates a new document.
///
/// Optional String. The path and filename of the optional document file that is to be loaded into the new document.
void Create(string file);
///
/// Performs optical character recognition (OCR) on the specified document or image.
///
/// ModiLanguage
/// Optional Boolean. Specifies whether the OCR engine attempts to determine the orientation of the page. Default is true.
/// Optional Boolean. Specifies whether the OCR engine attempts to "de-skew" the page to correct for small angles of misalignment from the vertical. Default is true.
void OCR(ModiLanguage language, bool orientimage, bool straightenImage);
///
///
///
///
///
///
void SaveAs(string filename, FileFormat fileFormat, CompressionLevel compressionLevel);
}
}