Splitting multipage pdf's takes forever

Added by S. McKay about 9 years ago

I apologize if this is mentioned somewhere else, but I did a minimal search and didn't find it. I've mentioned before that I grade on my ipad. I have some python code that splits the pdf of the exam by individual exam pages. This allows me to grade one page at a time.

In one class, there are two instructors, so I let the other instructor grade his pages, then I scanned them in. I had 3 pages (of a 9 page exam) that I needed to grade. So, I took the other pages, and ran them through AMC. It took an hour and a half to process the 6 pages for 36 exams. Most of the time was spent in splitting multipage pdf's.

After I graded my part, I decided to try the way I usually do it. (I split the multipage pdf's into jpg's using ghostscript). When I did the entire exam, it took about 15 minutes. When I loaded the jpg's into AMC, the processing went fairly quickly ( I can't remember, probably around 2 min or less).

So, my question is, why does it take so long when AMC splits the pdfs? I have attached the python code I use so you can see what commands are used. (I use ghostscript directly rather than imagemagick, because there is some kind of overhead with imagemagick that makes it go longer).

I am happy to continue to use my script, but it would be more convenient if AMC could do it directly.


ConvertToJpg.py (1.1 kB)