output the results tp pdf and png