void doc_PrintPage(object sender, PrintPageEventArgs e) { painter.Paint(e.Graphics, e.PageBounds); e.HasMorePages = false; }