Can someone provide some light on how to do this? I can do this for regular text or byte array, but not sure how to approach for a pdf. do i stuff the pdf into a byte array first?
Use File.ReadAllBytes to load the PDF file, and then encode the byte array as normal using Convert.ToBase64String(bytes).
File.ReadAllBytes
Convert.ToBase64String(bytes)
2.1m questions
2.1m answers
60 comments
57.0k users