fixing pdf conversion