I want to get in a variable what returns from toDataURL in a variable to be able to use it in the createPDF function, and be able to use it to create the pdf. Thanks in advance to anyone who can tell me how I can do it.