title: Change printer default paper size
body: <p>I have several custom paper sizes defined on a printer(the printer is set as default). I need to be able to select one of these formats as the default one.</p>
  
  <p>A programmatic(C#) solution would be ideal, but a command line one would be ok too.</p>
  
  <p>Right now, I am able to get the list of paper sizes(name/dimensions) defined on the printer, and I can find out which one is the default. </p>
  
  <p>In order to select another format as default, the only solution I have so far is by changing the <strong>dmPaperSize</strong> field on the <strong>devMode</strong> structure; BUT I cannot find out the correct value that corresponds to the desired paper format. So I set <strong>dmPaperSize</strong> to 0, and increment it, until the correct format appears on the printer. This takes a very long time on some printers.</p>
  
  <p>Is there another way to select(by name) the default papaer format on the default printer ?</p>