Allen:
I assume you are working in C#. Here is how I printed my map, and works really well:
Create a public object for the printer:
public PrintDocument printDocument;
Put a button on your form to invoke the print:
private void btnPrint_Click(object sender, EventArgs e)
{
printDocument.Print();
OPUSParentForm.Enabled = true;
this.Close();
}
Put code in the PrintDocument object’s PrintPage function:
private void printDocument_PrintPage(object sender, PrintPageEventArgs e)
{
Font font = new Font(“Courier New”, 9);
float lineHeight = font.GetHeight(e.Graphics);
float x = e.MarginBounds.Left; float y = e.MarginBounds.Top;
int pagewidth = (int)(e.MarginBounds.Right / font.SizeInPoints);
int pageheight = (int)(e.MarginBounds.Bottom - e.MarginBounds.Top);
int Width = winformsMap1.Width;
int Height = winformsMap1.Height;
Bitmap bitmap2 = new Bitmap(Width,Height);
winformsMap1.DrawToBitmap(bitmap2, new Rectangle(0, 0, Width, Height));
e.Graphics.DrawString(“your heading”);
y += lineHeight;
e.Graphics.DrawImage(bitmap2, x, y, 600, 500);
Pen boundPen = new Pen(Color.DarkGray, 1);
e.Graphics.DrawRectangle(boundPen, x, y, 600, 500);
y += 500 + lineHeight;
e.Graphics.DrawString(“your copyright”);
}
Hopefully this helps.
Elisa