Crop PDF with Inkscape

Using Inkscape to crop pdf-figures

Inkscape is an Open-Source-Vektorgrafic editor. It has a comand line interface and may be used to crop white margins from PDF figures. If multiple figures are stored in a directory you may do ls dir/*.pdf > dir/index and than call ./cropPDF.pl dir/index, with cropPDF.pl like:
#!/usr/bin/perl -w
while (<>) {
chop;                    #delete line break!
$file=$_;
$toexec="inkscape --file=".$file."  --export-area-drawing --export-pdf=".$file." --verb=FileClose";
system "echo $toexecn";
system "$toexec";
}
Login
Valid HTML 4.01!