I am trying to convert HTML5 canvas to PDF in JavaScript but I get a black background PDF. I tried to change the background color but still get black. The following is code I am
At first, you need to set the desired background color on the canvas before getting the data. Then, you need to draw jpeg image on the canvas.
canvas
data
jpeg