We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa444c8 commit 047b7cfCopy full SHA for 047b7cf
modules/base/makepdf.mjs
@@ -85,18 +85,20 @@ async function makePDF(svg, args) {
85
86
let doc;
87
88
+ const orientation = (svg.width < svg.height) ? 'portrait' : 'landscape';
89
+
90
if (args?.as_doc)
91
doc = args?.doc;
92
93
if (doc) {
94
doc.addPage({
- orientation: 'landscape',
95
+ orientation,
96
unit: 'px',
97
format: [svg.width + 10, svg.height + 10]
98
});
99
} else {
100
doc = new jsPDF({
101
102
103
104
0 commit comments