This is because you did not write a single line putting any content in print document. Please read carefully:
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx[
^].
Please see the code sample at the end of this article. It shows how to handle the event
PrintPage
and use the instance of the class
System.Drawing.Graphics
to put some graphics on the page. In this example, the line with "
ev.Graphics.DrawString
" is the only line where some content is put on page, and in your code there is nothing like that at all. No wonder it "prints" blank pages.
—SA