Merge "Trim unnecessary pages when printing." into lmp-dev