curiouswebster
asked on
C# WinForms: Breaking up a PrintDocument into pages?
I have the code for the attached file printing fine (the word 'test'), but I need to find out how to parse my text file document into individual pages.
How does that work?
As you can see in the demo which I have working, this line:
e.Graphics.DrawString("tes t",new Font(FontFamily.GenericSer if,12),
Brushes.Black,100,100);
prints one word. I have a multi-page text file. Must I iterate through the lines and pass each line into DrawString()? Is there an easier way?
Also, if I am to iterate, then I presume I must also determine if I am near a page break. And this is starting to sound like a Printer Device Context object, which I hope I do not need to deal with.
Please let me know.
Thanks.
How does that work?
As you can see in the demo which I have working, this line:
e.Graphics.DrawString("tes
Brushes.Black,100,100);
prints one word. I have a multi-page text file. Must I iterate through the lines and pass each line into DrawString()? Is there an easier way?
Also, if I am to iterate, then I presume I must also determine if I am near a page break. And this is starting to sound like a Printer Device Context object, which I hope I do not need to deal with.
Please let me know.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
e.HasMorePages = true
is key.
Thanks.