produce both svg and pdf now; better edge handling