Hi i have a problem with this procedure, i pass a correct base64 code but the pdf generated is 0kb
Attached is the correct base64 string that i send by parameter
Any suggestion?
Thanks
Attached is the correct base64 string that i send by parameter
cBase64:
Sub cBase64 ( str As String)
Dim B64 As Base64
Dim outs As OutputStream
Dim I As Intent
Dim ss As String
Dim FileName As String = "dataP.pdf"
File.Delete(File.DirDefaultExternal, "dataP.pdf")
outs = File.OpenOutput(File.DirDefaultExternal, "dataP.pdf", False)
outs.WriteBytes(B64.DecodeStoB( str ) , 0 , B64.DecodeStoB( str ).Length )
Try
'Dim Intent1 As Intent
'Dim pm As PackageManager
'Intent1 = pm.GetApplicationIntent("com.asus.filemanager")
'StartActivity (Intent1)
Dim i As Intent
i.Initialize(i.ACTION_VIEW, "file://" & File.Combine(File.DirDefaultExternal, "dataP.pdf"))
i.SetType("application/pdf")
StartActivity(i)
Catch
ToastMessageShow("Error al ejecutar", True)
End Try
End Sub
Any suggestion?
Thanks