How to set image to fit width of the page using jsPDF?
You can get the width and height of PDF document like below, var doc = new jsPDF(“p”, “mm”, “a4″); var width = doc.internal.pageSize.getWidth(); var height = doc.internal.pageSize.getHeight(); Then you can use this width and height for your image to fit the entire PDF document. var imgData=”data:image/jpeg;base64,/9j/4AAQSkZJ……”; doc.addImage(imgData, ‘JPEG’, 0, 0, width, height); Make sure that … Read more