I need to send a png file to the backend server. I converted it to pdf using jsPDF:
var doc = new jsPDF(\'l\', \'mm\', [210, 210]); doc.addImage(myPngData, \'PNG