in my web application there are some pages that are for A4 size and some for Legal Size paper. even if there is a Legal sized paper in printer it prints a page designed for one legal size paper on two when A4 is by default selected in page setup. I want to programmatically set appropriate paper size before printing each page. is it possible?