printReceipt(order){ //print receipt pass parameter of client name and its orders
console.log(order);
const doc = new jsPDF();
doc.text(order.orderClientName, 10, 10); //name of client
order.orderItem.forEach(a => {
doc.text(a.productPrice, 10, 10);
console.log(a.productPrice)
});
doc.save(`${order.orderClientName}.pdf`);
}
我要打印多次。我每个都有一个,并且多次打印数组的元素,但是不起作用。