var grd = panel1; Bitmap bmp = new Bitmap(grd.Width, 500 * xme, grd.CreateGraphics()); grd.DrawToBitmap(bmp, new Rectangle(0, 0, grd.Width, grd.Height)); RectangleF bounds = e.PageSettings.PrintableArea; float factor = ((float)bmp.Height / (float)bmp.Width); e.Graphics.DrawImage(bmp, bounds.Left, bounds.Top, bounds.Width, factor * bounds.Width);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)