[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatically add empty pages at the end of a book
From: |
Knut Petersen |
Subject: |
Re: Automatically add empty pages at the end of a book |
Date: |
Wed, 10 Dec 2014 10:46:17 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
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
- Re: Automatically add empty pages at the end of a book, (continued)
Re: Automatically add empty pages at the end of a book, Knut Petersen, 2014/12/09
Re: Automatically add empty pages at the end of a book, Knut Petersen, 2014/12/10
Re: Automatically add empty pages at the end of a book,
Knut Petersen <=
Re: Automatically add empty pages at the end of a book, Urs Liska, 2014/12/10