From: Vincent Le Gallic Date: Mon, 24 Mar 2014 22:34:06 +0000 (+0100) Subject: [cropgraph] Pour pdfcrop plusieurs fois un diagramme (dammit libreoffice) X-Git-Url: http://gitweb.pimeys.fr/?p=scripts-20-100.git;a=commitdiff_plain;h=d07397cc2fd3777fc26819dc3778351609a28700 [cropgraph] Pour pdfcrop plusieurs fois un diagramme (dammit libreoffice) --- diff --git a/cropgraph.sh b/cropgraph.sh new file mode 100755 index 0000000..35eaee2 --- /dev/null +++ b/cropgraph.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Pour croper 3 fois de suite un graphe pdf exporté par libreoffice +# Attention, pas d'espaces, pas de .pdf qui traîne au milieu… + +f=$1 +fname=${1/.pdf/} + +pdfcrop $1 +pdfcrop --margins "0 -10 0 -10" ${fname}-crop.pdf +pdfcrop ${fname}-crop-crop.pdf +mv ${fname}-crop-crop-crop.pdf ${fname}.pdf +rm -f ${fname}-crop.pdf +rm -f ${fname}-crop-crop.pdf