I'm trying to use the jsPDF lib to generate a pdf. I'm able to build the pdf but is there a way to pass in the page size to each page of the pdf? I'm currently getting output to the pdf with some extra white space below each of the 'images' that I add.
here is a screen shot of one of the pages on the pdf. It has the image and then there is white space that fills the rest of that page. I also have white space on the right because the width is wider than my image as well. The width isn't as much of an issue as the height problem. I'm sure I can scoot the images over by setting the x, y values on the following line:
pdf.addImage(img, 'JPEG', 0, 0);
But that won't help me with the height.
I'm currently just pumping images into the pdf 1 per page and I would like all the pages to be the same size. I will know the size of the images and would like to pass options in like this:
var pdf = new jsPDF(options, '', '', '');
or
pdf.addPage(options);
Is it possible to set the width and height of the pdf or the individual pages of the pdf?