Skip to main content
The Document object provides a set of methods and properties for working with a document. The object usually contains a lot of information about the processed document (image of the document, recognized text, etc.) and therefore requires considerable resources for operation. To save resources and provide parallel access to the processed document, ABBYY FlexiCapture SDK can provide the document in 3 different states: closed, open for reading, and open for reading and writing. The state of the document is defined by the IDocument::LockType property. For the closed document not all the properties and methods are available. If you want to view or to change the properties and structure of the document, the document should be open for reading or for reading and writing, respectively. The topics below describe the ways to change the state of the document:
To view the contents of a closed Document object, call the Open method with the FALSE value as the parameter. After the successful method execution the object is open for reading.If you do not need to view the properties of the document any more, you can close it using the Close method. In this case the document is closed and the resources are freed.
Before editing the document which is currently closed, you should call the Open method with the TRUE value as the parameter.After the successful method call the closed document will be open for reading and writing.
  • Before saving, verify the changes made to the document using the CheckRules method. You will be able to save the results even if some rules show errors.
  • You can save the changes made to the document and close it. To do this, call the Close method with the TRUE parameter.
  • You can save the changes made to the document and proceed with editing. To do this, call the Save method.
  • You can save the changes made to the document and keep it as open for reading. To do this, you can reopen the document by calling the Close method with the TRUE parameter and then call the Open method with the FALSE value as the parameter.
  • If you want to close the document and do not want to save changes made to it, call the Close method with the FALSE parameter.
  • If you want to keep the document as open for reading and do not want to save changes made to it, you can reopen the document by calling the Close method with the FALSE parameter and then call the Open method with the FALSE value as the parameter.

See also

Document LockTypeEnum IDocument::Open IDocument::Close IDocument::Save