A
Alex Smith
Hi Friends,
I have trying to open a PDF file in richtextbox, a .txt file open
successfully but a .pdf file open with unreadable form.
I have trying with
OpenFileDialog fileopen = new OpenFileDialog();
PdfLib.PdfClass newpdf = new PdfLib.PdfClass();
void Browse_Click(object sender, EventArgs e)
{
fileopen.ShowDialog();
string fname = fileopen.FileName;
StreamReader sr = new StreamReader(fname);
string varread = sr.ReadToEnd();
richTextBox1.Text = varread;
sr.Close();
}
Alex
I have trying to open a PDF file in richtextbox, a .txt file open
successfully but a .pdf file open with unreadable form.
I have trying with
OpenFileDialog fileopen = new OpenFileDialog();
PdfLib.PdfClass newpdf = new PdfLib.PdfClass();
void Browse_Click(object sender, EventArgs e)
{
fileopen.ShowDialog();
string fname = fileopen.FileName;
StreamReader sr = new StreamReader(fname);
string varread = sr.ReadToEnd();
richTextBox1.Text = varread;
sr.Close();
}
Alex