Download p5.js sketch canvas as PDF using jsPDF addImage JPEG
Trying to get a minimal script running to download a p5.js sketch canvas element as a PDF using jsPDF — specifically the jsPDF addImage method, after converting the canvas to a JPEG using the JS toDataURL method.