Added check for both page-height and page-width set to indefinite; use fallback (auto) for the appropriate one