I just published article on my blog here about printing Text From richTextBox but it only prints Text what about
printing some Text with all the font formatting you have done inside theRichTextBox we will follow pretty similar manner using draw string
method of the Graphics object
Summary of how we printing text here
- We Select one character and draw it on document including font color Font Type etc. .
- When we encounter \n we move Y Coordinate variable to +10 in Y Axis so it will be at new Line
That's it. very simple basic intention of article is yo make you start with printing formatted content the below code works for only Courier New Font but you can modify the code to make it work with others too .
Note :You need to Set position of X variable according to font you use in
richtext box I used x+8 because it is appropriate for Courier New font .