Document Printing in C#/VS 2010
<p>I want to print a text from file in C#(Visual Studio 2010), but file contains a unformatted text with very long strings; how can i print this file, if long string disappears from for borders and don't print? Give me an example please. Thank you. </p>

<pre><code>private void printDocumentMenu_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
String text = richTextBoxMenuOutput.Text;
OpenFileDialog openAnnotationFile = new OpenFileDialog();
if (openAnnotationFile.ShowDialog() == DialogResult.OK)
{
StreamReader reader = new StreamReader(openAnnotationFile.FileName);
e.Graphics.DrawString(reader.ReadToEnd(), this.Font, Brushes.Black, 0, 0);
}
}
</code></pre>
