Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi
I have a C# application through which I create a text file, which is formated nicely when I open it using notepad. When I print the file using NotePad's print option, the file is formated and printed as I see it on the screen.

I wrote my own print routine using the PrintDocument class to print the text file. When I print it via my print routine, the file is not formatted. How do I write a print routine, which would format the file and print it as it is seen on the screen. Any help is much appreciated.

Thanks in advance
K
Posted
Comments
dineshkumar51 24-Apr-12 2:53am    
have you solved the problem. Can i get sample program please
dineshkumar51 24-Apr-12 2:53am    
mdineshamu@gmail.com

1 solution

This[^] might help: in VB but you can translate.
 
Share this answer
 
Comments
Ed Nutting 8-Mar-12 16:15pm    
Looks good, my 5+ :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900