How to print preview my sinhala text from textbox?
<p>I want show print preview of my Sinhala text from textbox. In here I used print preview dialog</p>

<pre><code>    private void printDocument2_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs ev)
    {
        string strText = this.textBox1.Text; // read string from editor window
        StreamReader myReader = new StreamReader(strText, System.Text.Encoding.ASCII, false);
        int charactersOnPage = 5;
        float linesPerPage = 0;
        float yPosition = 0;
        int count = 0;
        float leftMargin = ev.MarginBounds.Left;
        float topMargin = ev.MarginBounds.Top;
        string line = null;
        Font printFont = this.textBox1.Font;
        SolidBrush myBrush = new SolidBrush(Color.Black);
        // Work out the number of lines per page, using the MarginBounds.
        linesPerPage = ev.MarginBounds.Height / printFont.GetHeight(ev.Graphics);
        // Iterate over the string using the StringReader, printing each line.
        while (count &lt; linesPerPage &amp;&amp; ((line = myReader.ReadLine()) != null))
        {
            // calculate the next line position based on the height of the font according to the printing device
            yPosition = topMargin + (count * printFont.GetHeight(ev.Graphics));
            // draw the next line in the rich edit control
            ev.Graphics.DrawString(line, printFont, myBrush, leftMargin, yPosition, new StringFormat());
            count++;
        }
        // If there are more lines, print another page.
        if (line != null)
            ev.HasMorePages = true;
        else
            ev.HasMorePages = false;
        myBrush.Dispose();
    }
</code></pre>

<p>This works, but my text is "අම්මා" but it show as this way අ්මමා" so please help me it show as correct way.</p>

<p>I want to print the contents of a TextBox, so I am trying make a PrintDocument out of the TextBox. But I dont find a way to convert a simple TextBox to a PrintDocument. Any ideas?</p>
