If my printer set the resolution at 300 dpi and I want to print at the other resolution. How to write code to do that?