Use File.ReadAllBytes to load the PDF file, and then encode the byte array as normal using Convert.ToBase64String(bytes).
Byte[] fileBytes = File.ReadAllBytes(@"TestData\example.pdf");
var content = Convert.ToBase64String(fileBytes);
Use File.ReadAllBytes to load the PDF file, and then encode the byte array as normal using Convert.ToBase64String(bytes).
Byte[] fileBytes = File.ReadAllBytes(@"TestData\example.pdf");
var content = Convert.ToBase64String(fileBytes);