Home › Forums › Chart Support › Export to pdf not working › Reply To: Export to pdf not working
You can pass image width and height parameters to addImage method of jsPDF to handle clipping of chart while exporting it as PDF. Please refer to jsPDF documentation for more information on the same. Below is the code-snippet with width & height parameters.
var dataURL = canvas.toDataURL();
var pdf = new jsPDF();
pdf.addImage(dataURL, 'JPEG', 20, 20, 170, 80); //addImage(image, format, x-coordinate, y-coordinate, width, height)
Please take a look at this updated JSFiddle for complete code.