From: Kim Nguyễn Date: Wed, 13 Apr 2016 05:27:26 +0000 (+0200) Subject: . X-Git-Url: http://git.nguyen.vg/gitweb/?p=hacks%2FsimpleWebSlides.git;a=commitdiff_plain;h=f713b8d35962fede3bf7d39acbd000a4ee1252c2 . --- diff --git a/scripts/nup.sh b/scripts/nup.sh index f882f34..61c2d32 100755 --- a/scripts/nup.sh +++ b/scripts/nup.sh @@ -8,7 +8,7 @@ fi OUTPUT="$OUTDIR"/$(basename "$INPUT" .pdf)"_print.pdf" TMP="$OUTDIR"/tmp.pdf rm -rf "$TMP" "$OUTPUT" -pdfjam --landscape --nup 2x2 --scale 0.9 --paper a4paper -o "$TMP" "$INPUT" +pdfjam --landscape --nup 2x2 --scale 0.95 --paper a4paper -o "$TMP" "$INPUT" gs -sOutputFile="$OUTPUT" -sPAPERSIZE=a4 -sDEVICE=pdfwrite -sPAPERSIZE=a4 -dCompatibilityLevel=1.3 \ -dDEVICEWIDTHPOINTS=841 \ -dDEVICEHEIGHTPOINTS=545 \ diff --git a/simpleWebSlides.css b/simpleWebSlides.css index bd42f5a..c2c72b7 100644 --- a/simpleWebSlides.css +++ b/simpleWebSlides.css @@ -14,6 +14,7 @@ body { .sws-canvas { display:flex; + justify-content: center; flex-direction:column; box-sizing: border-box; } @@ -52,8 +53,6 @@ body { overflow:hidden; } - - body > h1, body > h2, body > h3, body > a.sws-previous { display: none; } @@ -161,14 +160,12 @@ body > h1, body > h2, body > h3, body > a.sws-previous { } :root.sws-print .sws-canvas { - position: relative; width: 297mm; - height: 209mm; + height: 210mm; /* not 210mm to avoid rounding errors */ page-break-after: always; padding: 0pt 0pt 0pt 0pt; margin: 0pt 0pt 0pt 0pt; - overflow: hidden; } :root.sws-print .sws-canvas:last { @@ -179,11 +176,6 @@ body > h1, body > h2, body > h3, body > a.sws-previous { opacity: 1; } - - - - - p { width: 100%; } /* counters for the toc */ diff --git a/simpleWebSlides.js b/simpleWebSlides.js index 7483d4e..59c5a3f 100644 --- a/simpleWebSlides.js +++ b/simpleWebSlides.js @@ -518,8 +518,7 @@ SWS.Presentation = new function () { progress.remove(); window.status = 'Ready'; $.fx.off = old_fx_status; - if (SWS.Utils.getParameterByName("dialog") != "off") - $("body").ready( function () { window.print(); }); + } }; loop();