From Electron Cloud
Line 19: | Line 19: | ||
Save the above as pdfcat, chmod a+x and call it like this: | Save the above as pdfcat, chmod a+x and call it like this: | ||
+ | <pre> | ||
pdfcat out.pdf in1.pdf in2.pdf .... | pdfcat out.pdf in1.pdf in2.pdf .... | ||
+ | </pre> |
Revision as of 15:11, 2 May 2006
#!/bin/bash cat <<ENDTXT >__tmp__.tex \documentclass[landscape]{article} \usepackage{pdfpages} \begin{document} ENDTXT outnm=$1 count=`echo "$# - 1" |bc` for f in `seq $count`; do shift echo "\includepdf[pages=-]{$1}" >>__tmp__.tex done echo "\end{document}" >>__tmp__.tex pdflatex __tmp__.tex rm __tmp__.{tex,aux,log} mv __tmp__.pdf $outnm
Save the above as pdfcat, chmod a+x and call it like this:
pdfcat out.pdf in1.pdf in2.pdf ....