Feb 27
.. Image photo = Image.FromFile("c:\banana.jpg"); PrintDocument printDoc = new PrintDocument(); printDoc.PrintPage += new PrintPageEventHandler(printDoc_PrintPage); printDoc.Print(); .. void printDoc_PrintPage(object sender, PrintPageEventArgs e) { Point ulCorner = new Point(100, 100); e.Graphics.DrawImage(photo, ulCorner); InsertText("OK"); }
Print Preview
PrintPreviewDialog dlg = new PrintPreviewDialog(); dlg.Document = printDoc; dlg.ShowDialog();
Printer Settings Dialog
PrintDialog dlg = new PrintDialog(); dlg.Document = printDoc; dlg.ShowDialog(); // If the result is OK then print the document. if (result == DialogResult.OK) { printDoc.Print(); }


Recent Comments