[Solved] How to read a PDF into a memory stream? [closed]


If you MUST use a text field, you can read the file as a byte array, convert that to a base64 string, and store that in the text field:

string fileString = Convert.ToBase64String(memoryStream.ToArray());

or if you have an actual file on disk:

string fileString = Convert.ToBase64String(File.ReadAllBytes(@"path\to\file.pdf"));

2

solved How to read a PDF into a memory stream? [closed]