1
Reply

Can´t print multiple pages in C#

fj fj

fj fj

Dec 30 2005 12:51 PM
2.4k

Hi there.
I made a form with some Label controls on and lines and stuff. I have managed to make the computer print it. However, I would now like to add some code that will allow me to print out a second page with stuff. There is where my problem lies :-( The following code I added right after coding the very last thing that gets printed on the first page so the following is supposed to be printed on the second page:

e.HasMorePages = true;
Label svar1 = new Label();
svar1.Font = new Font("Times Roman", 12);
double result = double.NaN;
result = double.Parse(tnr1.Text) + double.Parse(tnr2.Text);
svar1.Text = result.ToString();
f.DrawString(svar1.Text, svar1.Font, new SolidBrush(svar1.ForeColor),
    65, 1650);
e.HasMorePages = false;

This however yields nothing, only the first page gets printed. Can someone please help me? What am I missing?
Best regards,


Answers (1)