Fix resize and pdf resolution