Tweaked to run on linux. Create pdf instead of wmf too.