On 10.12.2014 10:29, Knut Petersen wrote:
On 09.12.2014 22:45, Urs Liska wrote:
Am 09.12.2014 22:07, schrieb Knut Petersen:
On 09.12.2014 17:38, Urs Liska wrote:
Hi all,
if I produce scores that are to be printed on double-sided, folded sheets (i.e.
four A4 pages on one A3 sheet) I need to find a way to add empty pages to the
end of the score.
pdfjam is part of the pdfpages package. Try something like
pdfjam --landscape --keepinfo --paper a3paper --nup '2x1' --outfile out.pdf
-- in.pdf
I have to repeat myself: My issue is not about the imposing from A4 to A3.
I want to produce a file in A4 that *can* be imposed on a folded A4 paper.
So it has to have a page count of a multiple of 4.
Well, then try something like this:
I reread your original message, you want 1, 5, 9, 13 .... pages. So use this
modification of the previous script:
#!/bin/bash
if [ -z "$2" ]; then
echo use $0 in.pdf out.pdf
exit 1
fi
PDFJAM=`which pdfjam`
if [ "$PDFJAM" = "" ]; then
echo cannot find pdfjam!
exit 2
fi
PDFINFO=`which pdfinfo`
if [ "$PDFINFO" = "" ]; then
echo cannot find pdfinfo!
exit 3
fi
INPAGES=`pdfinfo $1 | grep Pages | grep -o "[[:digit:]]*"`
let "MOD = INPAGES % 4"
if [ $MOD -eq "0" ]; then
pdfjam --keepinfo --paper a4paper --outfile $2 -- $1 '1-,{}'
elif [ $MOD -eq "3" ]; then
pdfjam --keepinfo --paper a4paper --outfile $2 -- $1 '1-,{},{}'
elif [ $MOD -eq "2" ]; then
pdfjam --keepinfo --paper a4paper --outfile $2 -- $1 '1-,{},{},{}'
else
cp $1 $2
fi
exit 0
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user