private PrintDocument doc = null;
.
.
.
doc = new PrintDocument();
PrintController printController = new StandardPrintController();
doc.PrintController = printController;
doc.PrintPage += new PrintPageEventHandler(doc_PrintPage);
.
.
.
doc.Print();
.
.
.
private void doc_PrintPage(object sender, PrintPageEventArgs e)
{
try
{
Graphics gfxObj = e.Graphics;
// for upside down printing
graphics.RotateTransform(180.0F);
// graphics operations
.
.
.
}
catch
{
}
finally
{
}
}
No comments:
Post a Comment