title: How to print text to bottom left corner in page in C#
body: <p>Code below is used to print order.
  Order can have variable number of lines written out by first DrawString call.</p>
  
  <p>Text</p>
  
  <pre><code>Bottom line1
  Bottom line2
  </code></pre>
  
  <p>must appear in bottom left corner in page.</p>
  
  <p>Code below uses hard coded value  <code>e.MarginBounds.Top + 460</code> to print this. 
  How to remove this hard-coded value so that text is printed in bottom of page ?</p>
  
  <pre><code>   var doc = new PrintDocument();
     doc.PrinterSettings.PrinterName = "PDFCreator";
     doc.PrintPage += new PrintPageEventHandler(ProvideContent);
     doc.Print();
  
      void ProvideContent(object sender, PrintPageEventArgs e)
      {
          e.Graphics.DrawString("string containing variable number of lines", new Font("Arial", 12),
              Brushes.Black, e.MarginBounds.Left, e.MarginBounds.Top);
  
          e.Graphics.DrawString("Bottom line1\r\nBottom line2", new Font("Courier", 10), Brushes.Black,
                      e.MarginBounds.Left, e.MarginBounds.Top + 460);
       }
  </code></pre>