Hi,
I have a database where the PDF files are stored as blob. How can I load a blob file into the PDFViewer?
I've found the following function, but I still can't figure out how to load the blob.
Public Function DocumentRetrieve(ByVal jsonResult As Dictionary(Of String, String)) As Object
myCmd.Connection = myConnection.open
myCmd.Parameters.Clear()
myCmd.CommandText = "SELECT certificaat FROM certificaten WHERE certificaatId = 14"
myCmd.ExecuteNonQuery()
Dim myReader As MySqlDataReader
myReader = myCmd.ExecuteReader()
Dim byteArray As Byte() = CType(myReader("certificaat"), Byte())
Return "data:application/pdf;base64," & Convert.ToBase64String(byteArray)
End Function
Kind regards,
Bjorn.