Actually you are printing all the pictures on to of each other but at the endf only the last picture is visible.
Start by reading:
An absolute beginner's guide to printing in .NET[
^]
You want your PrintPage subroutine to be called once per picture - so what you do is if your current picture is not the last one, set e.HasMorePages = True to print another page. In that PrintPage subroutine, only print the current picture and increment the current picture counter.
int currentPicture = 0;
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
a = Convert.ToInt32(textBox1.Text);
Bitmap bp = new Bitmap(pic[ currentPicture ].Image, printDoc.DefaultPageSettings.PaperSize.Height, printDoc.DefaultPageSettings.PaperSize.Width);
Rectangle rec = new Rectangle(label2.Left + 16, label2.Top + 12, label2.Width, label2.Height);
e.Graphics.DrawImage(pic[ currentPicture ].Image, 0, 0);
LinearGradientBrush lgb = new LinearGradientBrush(rec, Color.Red, Color.Red, LinearGradientMode.Vertical);
e.Graphics.DrawString(q.ToString(), label2.Font, lgb, rec);
bp.Dispose();
printDoc.DefaultPageSettings.Landscape = true;
if (currentPicture < a)
{
currentPicture +=1;
e.HasMorePages = true;
}
}