How can I change the printer's orientation to landscape, print a report, then change it back to portrait, using APIs?