save the pdf state when the directive is destroyed
rescale pdf on parent size initialisation in addition to resizes