title: Print scaled image c#
body: <p>I'm trying to print image with this code.</p>
  
  <pre><code>   private void Print()
       {
           PrintDocument printDocument = new PrintDocument();
           printDocument.PrintPage += PrintDocument_PrintPage;
  
           PrintPreviewDialog printDialog = new PrintPreviewDialog();
           printDialog.Document = printDocument;
  
           DialogResult result = printDialog.ShowDialog();
           if (result == DialogResult.OK) printDocument.Print();
  
           printDocument.PrintPage -= PrintDocument_PrintPage;
       }
  
       private void PrintDocument_PrintPage(object sender, PrintPageEventArgs e)
       {
        //e.Graphics.DrawImage(img, e.PageBounds.X, e.PageBounds.Y);
          e.Graphics.DrawImage(img, e.PageBounds.X, e.PageBounds.Y, 
               e.PageBounds.Width, e.PageBounds.Height);
       }
  </code></pre>
  
  <p>When image is small it prints fine, but when its hi-rez (I have image 992*1403) it draws with wrong size.
  When I view <code>PreviewDialog</code> or draw it to the <em>pdf file</em> it prints fine, but when I print it on printer it prints wrong sized.</p>
  
  <p>Fixed my problem with this code:</p>
  
  <p>e.Graphics.DrawImage(img, 0, 0, e.PageSettings.PrintableArea.Width,       e.PageSettings.PrintableArea.Height);</p>