I don't know how often page 2 will be blank but why not do this through the normal print process rather than trying to code something. When you select print from the pull down, just specify page 1 of 1. Unfortunately, this option isn't available if you just click the button control instead.