From 9d5a1938bddef71263329633515d6f84ec14526d Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Mon, 25 Nov 2024 17:13:47 +0100 Subject: [PATCH] Build with 'portrait' pdf fix --- build/jsroot.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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] });