跳转到主要内容
此方法会打开受密码保护的图像文件,并将该已打开文件对应的页面添加到文档中。 此方法可能会向附加到 FRDocument 对象的 IConnectionPointContainer 接口的侦听器报告事件。

语法

C++

HRESULT AddImageFileWithPassword(
  BSTR               ImageFileName, 
  BSTR               Password,  
  IPrepareImageMode* PrepareMode,
  IIntsCollection*   PageIndices 
);

C#

void AddImageFileWithPassword(
  string           ImageFileName, 
  string           Password,  
  IPrepareImageMode PrepareMode,
  IIntsCollection   PageIndices 
);

Visual Basic .NET

Sub AddImageFileWithPassword( _
  ImageFileName As String, _
  Password As String, _
  [PrepareMode As IPrepareImageMode = Nothing], _
  [PageIndices As IIntsCollection = Nothing] _
)

参数

ImageFileName [in] 此变量包含要打开的图像文件的完整路径。 Password [in] 此变量包含用于访问 PDF 格式图像的密码。 PrepareMode [in] 此参数引用 PrepareImageMode 对象,用于指定图像在打开时如何进行预处理。 PageIndices [in] 此参数引用 IntsCollection 对象,用于指定要添加到文档中的页面索引。请注意,不允许有重复索引。若要多次添加同一页面,请多次调用此方法。
此参数为可选参数,也可以为 0;在这种情况下,打开文件中的所有页面都会添加到文档中。

返回值

此方法没有特定的返回值。它返回的是 ABBYY FineReader Engine 函数的标准返回值

备注

  • 使用此方法打开 PDF Portfolio 文件时,其封面始终会包含在输出文件中。
  • 对于 Linux 和 Windows:

另请参见

FRDocument AddImageFileWithPasswordCallback AddImageFile 处理图像