I am trying to convert pdf files to single jpg pages. As I am trying to do it with several files, I am not able to properly reset the counter to assign the right page number