I've seen a ton of examples on the stack about converting a base64 string and/or URI but can't seem to get it to render the base64. I've tried using a uri and a string. Using the code below, i am able to render a pdf but when i try to open the pdf it says an error has occurred. Nothing is rendered. Any ideas?
string base64BinaryStr = "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlIC9YT2JqZWN0IC9T";
using (FileStream stream = System.IO.File.Create(@"c:\Users\signature.pdf"))
{
byte[] byteArray = Convert.FromBase64String(base64BinaryStr);
stream.Write(byteArray, 0, byteArray.Length);
}
**Here's a screenshot of what the file does when i try to open it: