Skip to main content
Skip table of contents

ReplacePage Method

Replaces a page at a specific index on the process with another page.

public void ReplacePage(int index, string path);

Classes: Document


int index

The zero-based index at which the page should be replaced.

int path

Path pointing to the page to add to the process.


The following example demonstrates replacing the first page of a document with another document by file path.

Process.Document.ReplacePage(0, @"C:\Documents\page.pdf");


Throws an InvalidOperationException if called on a GlobalAction process.

Throws an IndexOutOfRangeException if the target index is too large for the document.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.