private void button1_Click(object sender, System.EventArgs e)
{
PrintDialog pd = new PrintDialog();
PrintDocument imageDoc = new PrintDocument();
pd.Document = imageDoc ;
imageDoc.PrintPage += new PrintPageEventHandler(imageDoc_PrintPage);
pd.ShowDialog();
}
private void imageDoc_PrintPage(object sender, PrintPageEventArgs e)
{
using( Bitmap drawImage = new Bitmap("myImage.jpg") )
{
// Draw the image to the printer
e.Graphics.DrawImage( drawImage, new Point(10,10) ) ;
}
Within imageDoc_PrintPage, how would you determine the width and height of the client space (printable space within the page) so that you can create a rectangle suitable for a particular image
Thanks!

How do I find the printable client width and height?
RotoLuter
Rectangle pageRect = new Rectangle(e.MarginBounds.Left, e.MarginBounds.Top , e.MarginBounds.Width, e.MarginBounds.Height);
You can also look at the header and footer height values and then calculate the bounds left for the page.
Ayman Shoukry - MSFT
Thank you. :)