getPageWidth method

double getPageWidth(
  1. int index
)

Get page width for a specific page index.

Implementation

double getPageWidth(int index) {
  if (index >= 0 && index < pageCount) {
    return document.pages[index].width;
  }
  return 612; // default US Letter width
}