- ImageMagick (convert) - http://www.imagemagick.org/script/binary-releases.php
- pdfimages - http://en.wikipedia.org/wiki/Pdfimages
570 pdfimages ../../20120101.pdf 20120101 571 convert *.ppm -fuzz 7% -trim ../20120101-%d.jpg
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.
570 pdfimages ../../20120101.pdf 20120101 571 convert *.ppm -fuzz 7% -trim ../20120101-%d.jpg
1273 pdftk S89E.pdf output S89E.unc.pdf uncompress 1274 sed 's/MediaBox \[0 0 612 792\]/MediaBox \[-70 0 542 812\]/g'< S89E.unc.pdf > S89.resized.pdf
Examples
1301 sed 's/MediaBox \[0 0 612 792\]/MediaBox \[0 70 612 862\]/g'< S89E.unc.pdf > S89.resized.pdf 1304 sed 's/MediaBox \[0 0 612 792\]/MediaBox \[0 -70 612 722\]/g'< S89E.unc.pdf > S89.resized.pdf 1305 sed 's/MediaBox \[0 0 612 792\]/MediaBox \[70 0 682 792\]/g'< S89E.unc.pdf > S89.resized.pdf 1306 sed 's/MediaBox \[0 0 612 792\]/MediaBox \[-70 0 542 792\]/g'< S89E.unc.pdf > S89.resized.pdf
$ 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"
}'
use Encode; use PDF::Reuse; # remove the codec formating to avoid # "Wide character in compress at /usr/lib/perl5/site_perl/5.10/PDF/Reuse.pm line" $content = encode( "utf8", $content );