#!/bin/bash

#John Croft 2016-12-01


#Take a .wmf file as input
arg=$1
#Convert .wmf file to pdf
unoconv -f pdf $arg
#Cut off extension and replace with .pdf extension, in order to feed into pdfcrop
pdfarg=`echo $arg | cut -d . -f 1`
pdfarg="${pdfarg}.pdf"
#Crop the converted file. Output with same name.
pdfcrop $pdfarg $pdfarg


