copyPage method
Copies a page in the current document and inserts the copy at the specified index.
Parameters:
pageIndex - The zero-based index of the page to copy.
insertIndex - The zero-based index where the copied page will be
inserted. Use -1 to append the copied page to the end of the document.
Returns: true if the page is copied and inserted successfully,
otherwise false.
Since v2.6.8
example:
final result = await document.copyPage(pageIndex: 0, insertIndex: -1);
Implementation
Future<bool> copyPage({
required int pageIndex,
required int insertIndex,
}) async {
return await _channel.invokeMethod('copy_page', {
'page_index': pageIndex,
'insert_index': insertIndex,
});
}