Your comment is still not very clear. however, I assume you are referring to the following lines of code:
string file = openFileDialog1.FileName;
byte[] byt = File.ReadAllBytes(file);
((RichTextBox)this.RichTextBoxes[i]).Text = Convert.ToBase64String(byt);
You are reading the raw bytes of a PDF file and passing it to a
RichTextBox
[
^]. This will not work as the two are not directly compatible. You need to use iTextSharp (or similar) to read the data content of the PDF file, and present it in a form acceptable to the
RichtextBox
.