Mercurial > dottes
changeset 303:67dc98ae4816
Crop PDFs after generation so that they don't have white borders - document can do that.
| author | Jim Hague <jim.hague@acm.org> | 
|---|---|
| date | Sun, 07 Jul 2013 20:27:27 +0100 | 
| parents | a1839449824b | 
| children | 9c5cabaabbec | 
| files | makeGraphics.sh | 
| diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] | 
line wrap: on
 line diff
--- a/makeGraphics.sh Sun Jul 07 20:26:41 2013 +0100 +++ b/makeGraphics.sh Sun Jul 07 20:27:27 2013 +0100 @@ -27,12 +27,18 @@ # Make $name.eps so we can build with LaTeX. mv $graphicsdir/${name}001.eps $graphicsdir/${name}.eps # 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. $dir/abcfirstline.py $filename > firstline.abc abcm2ps +c -M +Q -E -O $graphicsdir/firstline-$name.eps firstline.abc mv $graphicsdir/firstline-${name}001.eps $graphicsdir/firstline-${name}.eps 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
