Update pdfnup-slides
parent
eefdcd621d
commit
a29f28d7f4
@ -1,34 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
tmp=$(mktemp -d /tmp/pdfnup-slides-XXXXX)
|
file=$1
|
||||||
[ -z "$tmp" ] && exit 1
|
|
||||||
|
|
||||||
# put 2x3 slides (pdf) on one page
|
# put 1x2 slides (pdf) on one page
|
||||||
#pdfnup --nup 2x3 --frame true \
|
pdfnup --nup 1x2 \
|
||||||
# --delta "0.5cm 3cm" --offset "0cm 1cm" \
|
--no-landscape \
|
||||||
# --scale 0.85 \
|
|
||||||
# "$@" \
|
|
||||||
# --outfile "$tmp/1.pdf"
|
|
||||||
|
|
||||||
# put 2x2 slides (pdf) on one page
|
|
||||||
pdfnup --nup 2x2 --frame true \
|
|
||||||
--delta "0.5cm 0.5cm" \
|
--delta "0.5cm 0.5cm" \
|
||||||
--scale 0.9 \
|
--scale 0.9 \
|
||||||
"$@" \
|
"$@" \
|
||||||
--outfile "$tmp/1.pdf"
|
--outfile "${1%%.pdf}.nup.pdf"
|
||||||
|
|
||||||
# scale up to a4 - now works for beamer slides, too.
|
|
||||||
# hackhackhack
|
|
||||||
cat > "$tmp/2.tex" <<EOF
|
|
||||||
\documentclass[a4paper,landscape]{article}
|
|
||||||
\usepackage{pdfpages}
|
|
||||||
\begin{document}
|
|
||||||
\includepdf[pages=-,nup=1x1,frame=false,trim=0 0 0 0,delta=0 0,offset=0 0,scale=1.0,turn=true,noautoscale=false,column=false,columnstrict=false,openright=false]{$tmp/1.pdf}
|
|
||||||
\end{document}
|
|
||||||
EOF
|
|
||||||
pdflatex -output-directory "$tmp" "$tmp/2.tex"
|
|
||||||
mv -v "$tmp/2.pdf" "$1.2x2.pdf"
|
|
||||||
|
|
||||||
# cleanup
|
|
||||||
rm -f "$tmp"/*.pdf "$tmp"/*.tex "$tmp"/*.aux "$tmp"/*.log
|
|
||||||
rmdir "$tmp"
|
|
||||||
|
Loading…
Reference in New Issue