fixing error save file as pdf