Defaults to the browsers device pixel ratio. Example : image size : 816x422 image size :1193x437 here in my code: html2canvas generates snapshot of webpage is based on the system Resolution. So if the Image is smaller there will be white area round the image, if it is larger the image will not fit the canvas so ⦠To set the size of an image using HTML5 Canvas, we can add two additional arguments to the drawImage() method, width and height. The drawImage () method draws an image, canvas, or video onto the canvas. It slices that image up into single pages and adds them into a jsPDF. If the requested type is not image/png, but the returned value starts with data:image/png, then the requested type is not supported. The callback function passed to then won't be invoked immediately; it will be invoked when the function has completed. Tip: Each time the height or width of a canvas is re-set, the canvas content will be cleared (see example at bottom of page). The height attribute specifies the height of the