IImagePasswordCallback Interface
This interface is to be implemented on the client-side. It contains a method which can return a password when it is needed to access the image file. Currently, only files in PDF format can be protected with passwords.
The sequence of usage for this interface is as follows:
- The user of ABBYY FineReader Engine implements an object with the IImagePasswordCallback interface. For C++, this object should be derived from this interface and implement its raw_GetPassword method. This object should also implement the methods of the IUnknown interface.
- The user then passes a pointer to this object's interface into any of the IFRDocument::AddImageFileWithPasswordCallback, IEngine::GetNumberOfPagesInImageFile, IEngine::RecognizeImageFile methods as one of input parameters. ABBYY FineReader Engine will call the GetPassword method of this object to get the password if necessary.
In the case when the user does not expect to deal with password-protected image files or does not want to handle password requests, the NULL pointer may be passed instead of the pointer to IImagePasswordCallback interface. The only disadvantage of this approach is that password-protected image files will not be opened with ABBYY FineReader Engine.
Method
Name | Description |
---|---|
GetPassword | Returns the password. |
Input parameter
This object is passed as an input parameter to the following methods:
- OpenImageFileFromMemory, RecognizeImageFile, GetNumberOfPagesInImageFile, IsPdfPortfolio, IsPdfPortfolioFromStream, IsPdfWithTextualContent, IsPdfWithTextualContentFromStream, InjectTextLayer methods of the Engine object.
- AddImageFileFromAttachment and AddImageFileWithPasswordCallback methods of the FRDocument object.
03.07.2024 8:50:10