First convert from your base64 string to a byte array:
Dim bytes As Byte() = Convert.FromBase64String(base64_string)
Next save the byte array to disk:
Dim stream As System.IO.FileStream = New FileStream("C:\mypdf.pdf", FileMode.CreateNew) Dim writer As System.IO.BinaryWriter = New BinaryWriter(stream) writer.Write(bytes, 0, bytes.Length) writer.Close()