Skip to main content
This method opens an image file using the IImagePasswordCallback interface and adds the pages corresponding to the opened file to a document. This method may report events to the listeners attached to the IConnectionPointContainer interface of the FRDocument object.

Syntax

C++

HRESULT AddImageFileWithPasswordCallback(
  BSTR                    ImageFileName, 
  IImagePasswordCallback* Callback,
  IPrepareImageMode*      PrepareMode,
  IIntsCollection*        PageIndices   
);

C#

void AddImageFileWithPasswordCallback(
  string                 ImageFileName, 
  IImagePasswordCallback Callback,
  IPrepareImageMode       PrepareMode,
  IIntsCollection         PageIndices   
);

Visual Basic .NET

Sub AddImageFileWithPasswordCallback( _
  ImageFileName As String, _
  Callback As IImagePasswordCallback, _
  [PrepareMode As IPrepareImageMode = Nothing], _
  [PageIndices As IIntsCollection = Nothing] _
)

Parameters

ImageFileName [in] This variable contains the full path to the image file to be opened. Callback [in] This variable refers to the interface of the user-implemented object of the type ImagePasswordCallback which is used to handle possible password requests for accessing images in PDF format. This parameter is optional and may be 0, in which case password-protected files cannot be processed. PrepareMode [in] This parameter refers to the PrepareImageMode object which specifies how an image will be preprocessed during opening. PageIndices [in] This parameter refers to the IntsCollection object which specifies the indices of the pages which have to be added to a document. Note that repeated indices are not allowed. To add the same page several times, please call this method several times.
This parameter is optional and may be 0, in which case all the pages of the opened file will be added to the document.

Return values

This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.

Remarks

  • When opening a PDF Portfolio file using this method, its cover is always included in the output file.
  • For Linux and Windows:
  • For Linux: This method does not work if the Engine object is loaded as an out-of-process server.

See also

FRDocument AddImageFileWithPassword AddImageFile Working with Images