I could not figure out how to add dynamic predefined text on canvas? I wanna print for example the date or customer name before takinf signature of customer but how?
I saw some examples on w3schools.com like
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
I could not figure out how to add dynamic predefined text on canvas? I wanna print for example the date or customer name before takinf signature of customer but how?
I saw some examples on w3schools.com like
var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d");
ctx.font="20px Georgia"; ctx.fillText("Hello World!",10,50);
but when i try getcontxt i am getting error like canvas.getContext('2d'); is not a function