diff --git a/build/jsroot.js b/build/jsroot.js index 8ace8f7fb..150fcd51c 100644 --- a/build/jsroot.js +++ b/build/jsroot.js @@ -142334,18 +142334,20 @@ async function makePDF(svg, args) { let doc; + const orientation = (svg.width < svg.height) ? 'portrait' : 'landscape'; + if (args?.as_doc) doc = args?.doc; if (doc) { doc.addPage({ - orientation: 'landscape', + orientation, unit: 'px', format: [svg.width + 10, svg.height + 10] }); } else { doc = new jsPDF({ - orientation: 'landscape', + orientation, unit: 'px', format: [svg.width + 10, svg.height + 10] });