Hi, you can print an image using the
PrintDocument[
^] class.
Just use the
Graphics.DrawImage(
) method in the PrintDocument's
PrintPage
event:
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(m_image, 0, 0);
}
The above code assumes that your image is loaded in
Bitmap m_image;
member.
For setting the paper size you can use PrintDocument's
DefaultPageSettings.PaperSize
property.
I hope this helps! :)
Regards