const doc = new jsPDF({
unit: 'px',
format: 'a4', // ensures proper A4 size
});
const pageWidth2 = doc.internal.pageSize.width;
console.log(doc.internal.pageSize.height , doc.internal.pageSize.width);
the res is 631.4175 446.46
also i test other unit they are work as well