title: C# printing page height according to the content
body: <p>I'm doing some printing work in c# and got a small problem. I'm working with a thermal receipt printer. I want to set the height of the page according to the content of it. Which means, when I have fewer items, the page should be smaller and when I have  long list of items, the page should grow accordingly. 
  I tried to set it with <code>PrintPageEventArgs</code> but this didn't result in satisfied result. How can this be done?</p>
  
  <p>Thanks</p>