forked from CryHavoc/dottes
Crop PDFs after generation so that they don't have white borders - document can do that.
This commit is contained in:
parent
5039ce0be5
commit
22d10243d5
|
@ -27,12 +27,18 @@ find $booke -name "*.abc" | sort |
|
||||||
# Make $name.eps so we can build with LaTeX.
|
# Make $name.eps so we can build with LaTeX.
|
||||||
mv $graphicsdir/${name}001.eps $graphicsdir/${name}.eps
|
mv $graphicsdir/${name}001.eps $graphicsdir/${name}.eps
|
||||||
# And make the corresponding PDF.
|
# And make the corresponding PDF.
|
||||||
epstopdf --outfile=$graphicsdir/$name.pdf $graphicsdir/${name}.eps
|
epstopdf --outfile=$graphicsdir/$name-tocrop.pdf $graphicsdir/${name}.eps
|
||||||
|
# And crop it, so the graphic is as big as possible on the page.
|
||||||
|
pdfcrop $graphicsdir/$name-tocrop.pdf $graphicsdir/$name.pdf
|
||||||
|
rm $graphicsdir/$name-tocrop.pdf
|
||||||
|
|
||||||
# and make the first line graphic.
|
# and make the first line graphic.
|
||||||
$dir/abcfirstline.py $filename > firstline.abc
|
$dir/abcfirstline.py $filename > firstline.abc
|
||||||
abcm2ps +c -M +Q -E -O $graphicsdir/firstline-$name.eps firstline.abc
|
abcm2ps +c -M +Q -E -O $graphicsdir/firstline-$name.eps firstline.abc
|
||||||
mv $graphicsdir/firstline-${name}001.eps $graphicsdir/firstline-${name}.eps
|
mv $graphicsdir/firstline-${name}001.eps $graphicsdir/firstline-${name}.eps
|
||||||
rm firstline.abc
|
rm firstline.abc
|
||||||
epstopdf --outfile=$graphicsdir/firstline-$name.pdf $graphicsdir/firstline-${name}.eps
|
epstopdf --outfile=$graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-${name}.eps
|
||||||
|
# And crop it, so the graphic is as big as possible on the page.
|
||||||
|
pdfcrop $graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-$name.pdf
|
||||||
|
rm $graphicsdir/firstline-$name-tocrop.pdf
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue