public void PD_PrintPage(object sender, PrintPageEventArgs e) { float W = e.MarginBounds.Width; float H = e.MarginBounds.Height; for (; FileCounter >= 0; FileCounter--) { try { Bitmap Bmp = new Bitmap(BmpFiles[FileCounter]); if (Bmp.Width / W < Bmp.Height / H) W = Bmp.Width * H / Bmp.Height; else H = Bmp.Height * W / Bmp.Width; e.Graphics.DrawImage(Bmp, 0, 0, W, H); break; } catch { } } FileCounter -= 1; if (FileCounter > 0) { e.HasMorePages = true; } else { FileCounter = BmpFiles.Length - 1; } }
this will print all images in different page
I want some functionality that will print one image ,leave some space and again prine other image in same page if space is remaining.