public Bitmap PrintToImage() { curr.DoOperation(GUI.View.EditOperation.SelectNone); Rectangle rect = curr.GetContentRectangle(); if (rect.IsEmpty) { return(null); } Bitmap bmp = new Bitmap(rect.Width, rect.Height); using (Graphics gr = Graphics.FromImage(bmp)) { gr.FillRectangle(Brushes.White, 0, 0, rect.Width, rect.Height); curr.Paint(gr, new Rectangle(new Point(0, 0), rect.Size), rect.X, rect.Y); } return(bmp); }