make the pdftogif function run on multiple inputs