Get page height for a specific page index.
double getPageHeight(int index) { if (index >= 0 && index < pageCount) { return document.pages[index].height; } return 792; // default US Letter height }