> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ReplacePageImage

> ABBYY FlexiCapture ウェブサービス API の ReplacePageImage メソッドは、ドキュメント内の既存のページ画像を、呼び出し元から渡された新しい File に置き換えます。

<div id="what-it-does">
  ## 機能
</div>

ページ画像を置き換えます。

<Warning>
  追加した画像は、前処理が完了した後でないと利用できません。画像を追加した後にバッチ処理を開始するには、[ProcessBatch](/ja/flexi-capture/api/methods/process-batch) メソッドを使用してください。画像が [OpenTask](/ja/flexi-capture/api/methods/open-task) メソッドで開いたタスクのドキュメントに追加された場合は、[CloseTask](/ja/flexi-capture/api/methods/close-task) メソッドを使用してタスクを閉じ、Import ステージに送信してください。
</Warning>

<div id="definition">
  ## 定義
</div>

```
void ReplacePageImage( int sessionId, int batchId, int documentId, int pageId, File file );
```

<div id="parameters">
  ## パラメーター
</div>

| **名前**     | **型**                                         | **説明**                      |
| ---------- | --------------------------------------------- | --------------------------- |
| sessionId  | int                                           | Application Server への接続の ID |
| batchId    | int                                           | ドキュメントを含む バッチ の ID          |
| documentId | int                                           | ページ画像を置き換える対象のドキュメントの ID    |
| pageId     | int                                           | 画像を置き換える対象のページの ID          |
| file       | [File](/ja/flexi-capture/api/structures/file) | 画像ファイル                      |

<Note>
  ページ画像を追加するには、[POST リクエスト](/ja/flexi-capture/api/files/files) を使用することもできます。このメソッドを呼び出した後、次のパラメーターを指定して POST リクエストを送信します。
</Note>

* Action = Save
* objectType = 0
* objectId = documentId
* version = 0
* streamName = "Page pageId"。ここで、pageId は画像を置き換える対象のページの ID です

<div id="returned-value">
  ## 戻り値
</div>

ありません。
