removePages method

Future<bool> removePages(
  1. List<int> pageIndexes
)

Removes pages at the specified indexes from the document. This method allows you to delete multiple pages from the PDF document by providing a list of page indexes. Parameters:

  • pageIndexes A list of integers representing the indexes of the pages to be removed. example:
List<int> pagesToRemove = [0, 1, 2]; // Pages to remove
bool result = await document.removePages(pagesToRemove);

Implementation

Future<bool> removePages(List<int> pageIndexes) async {
  if (pageIndexes.isEmpty) return false;
  return await _channel.invokeMethod('remove_pages', pageIndexes);
}