hallo,
I want to create a print preview for an invoice. What I'm having problems with is, most of the content in the print preview is pulled from a database and not the form, I am not sure how to implement this into the code, plus how would I change the font size, color, position...
private void preview_btn_Click(object sender, EventArgs e)
{
ThePrintDocument.PrintPage +=
new System.Drawing.Printing.PrintPageEventHandler(PrintPage);
string strText = "test" // HOW CAN I ADD FROM DB
myStringReader = new System.IO.StringReader(strText);
PrintPreviewDialog printPreviewDialog1 = new PrintPreviewDialog();
printPreviewDialog1.Width = 1100;
printPreviewDialog1.Height = 900;
printPreviewDialog1.Document = this.ThePrintDocument;
printPreviewDialog1.ShowDialog();
}