generate a pdf from a search