我在base64中有一个编码的PDF。
Dim pdf As String = ""
pdf = x.SIOrderPDF(apiKey, UserHash, tablicaZlecen, "pl").pdf 'this method returns a string pdf encoded in base64
这是我的问题,如何解码?
答案 0 :(得分:1)
我认为这就是你所需要的:http://www.example-code.com/vb/base64-encode-decode.asp
为了遵守本答复评论中的要求,我还将上述链接中的所有代码复制到此处:
Dim crypt As New ChilkatCrypt2
crypt.CryptAlgorithm = "none"
crypt.EncodingMode = "base64"
Dim strBase64 As String
strBase64 = crypt.EncryptStringENC(s)
Text1.Text = Text1.Text & strBase64 & vbCrLf
Dim decoded As String
decoded = crypt.DecryptStringENC(strBase64)