|
@@ -142,9 +142,9 @@
|
|
|
// 使用 jsPDF 将 canvas 转换成 PDF
|
|
|
const imgData = canvas.toDataURL('image/png');
|
|
|
const pdf = new jspdf.jsPDF({
|
|
|
- orientation: 'p',
|
|
|
+ orientation: 'pportrait',
|
|
|
unit: 'px',
|
|
|
- format: [canvas.width, canvas.height]
|
|
|
+ format: 'a4'
|
|
|
});
|
|
|
|
|
|
const imgProps = pdf.getImageProperties(imgData);
|
|
@@ -162,9 +162,9 @@
|
|
|
// 使用 jsPDF 将 canvas 转换成 PDF
|
|
|
const imgData = canvas.toDataURL('image/png');
|
|
|
const pdf = new jspdf.jsPDF({
|
|
|
- orientation: 'p',
|
|
|
+ orientation: 'portrait',
|
|
|
unit: 'px',
|
|
|
- format: [canvas.width, canvas.height]
|
|
|
+ format: 'a4'
|
|
|
});
|
|
|
|
|
|
const imgProps = pdf.getImageProperties(imgData);
|