Printing Text File / Rich Textbox
Posted on 2001-06-21
I need the easiest way to print a file (text file saved with a .prt extension).
This was originally a report sent to the printer and saved to a file.
I preview this file in a rich textbox and allow the user the ability to change the font and the font size.
My problem is that on multiple paged reports, I need to be able to distinguish how many pages there are so that I can properly send all pages or just the current page to the printer (as well as a range of pages).
I know that the pages are seperated with the "".
I have several documents that show how to print. I have tried many of them and can get them to work, but they all have a restriction of some sort.
Please do not post a link to an article or code unless you know that it will address all of the issues, or unless you provide code that will modify a link to comply.
What I am looking for is code that will consider the "" to allow me to print either the entire report (and have it properly seperate the pages), print the current page that the user is at (scrolled to in the rich textbox or clicked with the mouse), or can print a range of pages (say 3 through 6 of a 12 page report).
I have assigned 200 points as this is categorized as "hard" by E-E. I will consider adjusting points for exceptional code.