$ find . -type f -name '*.pdf' | perl -ne 'BEGIN { my @c=() } { push @c, $_;$_=undef; } END {my $n=65; foreach (@c) { chomp; $x=$x.sprintf " %c=\"%s\"", $n,$_;$y=$y. sprintf " %c", $n; $n++ }; print "\npdftk $x shuffle $y output collated.pdf;\n" }'
Rants and ravings of a semi-autistic developer who has a hard time remembering idiotic nonsense details. Why remember it, when you know where to find it.
Wednesday, December 28, 2011
PDFTK find pdfs and collate them oneliner
Here a oneliner to merge PDF's together that are in a sub-directory structure. (Prerequisite: installed working version of pdftk)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment