I'm using jsPDF to create a PDF doc on Chrome v67, 64 bit. I've attempted to set the width and height of PDF document using the code below as described here:
var doc = new jsPDF("p", "mm", "a4");
var width = doc.internal.pageSize.width;
var height = doc.internal.pageSize.height;
The problem I encountered was that the width and height were not being applied. For giggles I added the following line of code after the code above:
console.log("AT#1: width=" + width + ", heigth=" + height);
only to find that the values of the width and height when I output to the console are undefined:
AT#1: width=undefined, heigth=undefined
I've searched S.O. and Google but have not found anything that suggest a possible solution or reason why they are undefined. Currently this has me stumped. Any ideas or suggestions?