Fix getPageDimensions failure handling