private void printPreview_Click(object sender, EventArgs e)
{
PrintPreviewShowing();
}
private void PrintPreviewShowing()
{
printPreviewControl1.Document = docToPrintOb;
docToPrintOb.DefaultPageSettings.Landscape = true;
docToPrintOb.DefaultPageSettings.PaperSize = new PaperSize("MyPaper", 900, 1100);
// Add PrintDocument PrintPage event handler
this.docToPrintOb.PrintPage +=
new System.Drawing.Printing.PrintPageEventHandler(PrintPageMethod);
}
private void PrintPageMethod(object sender, PrintPageEventArgs e)
{
string text = "Sample text has been \n previewed. ";
e.Graphics.DrawString(text, new Font("Georgia", 35, FontStyle.Bold),
Brushes.Black, 100, 100);
}
Comments1
develop allergy to doxycycline