I'm developing a phonegap app and I need it to be able to convert a string that will be in a localStorage variable into a PNG image and share it on WhatsApp Messenger. I've never done somethin' like that before. The idea of using canvas to generate the Image came to mind but I have no idea how to work it out from there and sent the data I've got from the dataToUrl function to WhatsApp. If someone can give me an idea on how to do it or an alternative way to do it I'd really appreciate. The string will be something like shown below:
"##########################
Central Jogos
##########################
Apostador: test
Valor Apostado: R$5
Valor Retorno: R$6.15
Data Aposta: 19/02/2017 15:07
Qtd. Jogos: 1
-----------------------------------------
Vasco X Flamengo
Empate: 1.23
10/03/2017 15:30
=======================
Cambista: Cambista Teste
Telefone: (82) 9977-8877"