Hi,
I have a problem with create new printpage.
printDoc.PrintPage += new PrintPageEventHandler(printDoc_PrintPage);
PrintPreviewDialog dlg = new PrintPreviewDialog();
dlg.Document = printDoc;
dlg.ShowDialog();
---
private void printDoc_PrintPage(Object sender, PrintPageEventArgs e)
{
Font font_z = new Font("Courier New", 12);
StringFormat format_z = new StringFormat();
format_z.Alignment = StringAlignment.Near;
format_z.LineAlignment = StringAlignment.Near;
e.Graphics.DrawString("BOLD TEXT: (from TEXTBOX)", new Font(font_z, FontStyle.Bold), Brushes.Black, 50, 50, format_z);
e.Graphics.DrawString("normal text (from TEXTBOX)", font_z, Brushes.Black, 50, 70, format_z);
e.Graphics.DrawString("BOLD TEXT: (from TEXTBOX)", new Font(font_z, FontStyle.Bold), Brushes.Black, 50, 100, format_z);
|
Is some better code?
I have more textboxes and positioning of each line is terrible.
AND
how to get another textbox on another page?
Thanks Lukas
FroglegPosted Dec 24, 2010, 12:29 AM
if (needMoreLines == true)
{
e.HasMorePages = true;
}
else
{
e.HasMorePages = false;
}
Lukas HosekPosted Dec 13, 2010, 5:18 AM
CrishPosted Dec 13, 2010, 5:15 AM
If you want to get detail about Printing, textoxes and another page.You can refer this below link,It will help you.
http://office.microsoft.com/en-us/word-help/add-or-delete-a-text-box-HA010230259.aspx