qpdf or pdftk or gs????

Added by S. McKay over 5 years ago

Hi,
Our department recently installed Ubuntu and AMC on some desktop pc's, to help those in charge of large section exams to process them. Recently, the faculty member with one of the ubuntu boxes told me that it took 6 hours to print 1100 papers for his most recent exam. This was not in line with my experience, so I investigated why. I discovered that there are three different programs you can use to split out the individual tests. I don't know how long this option has been around, but I've been using AMC (on a mac) since 1.2.1 (these are at 1.4) and the default has always been pdftk. Since that worked, I don't know when the other options showed up. On the new Ubuntu boxes, with a clean install of AMC 1.4, qpdf is the default. I was wondering why people use qpdf instead of pdftk. Just to illustrate my point, I did some (admittedly rough) timings of each program in printing 10 exams. Note that these were not sent directly to the printer because we are still having some issues with the printer and these boxes. Rather, they were printed to files. The timings are:

qpdf 201 sec.
pdftk 27 sec.
gs 23 sec.
Under these timings, printing 1100 exams under qpdf takes 6.14 hours, which is in line with my colleagues experience. On the other hand, pdftk takes .8 hour and gs takes .7 hour.

qpdf is so much slower than the other options that I was wondering what the use case was? Is it a backup option, in case pdftk has problems (and we know it has occasionally)? Is there a use case where qpdf is faster?

I apologize for all the questions. I switched my colleagues machine to use pdftk, when solves his problem. I'm just curious however.

Thanks,


Replies (5)

RE: qpdf or pdftk or gs???? - Added by S. McKay over 5 years ago

I should mention that I am running Ubuntu 18.04 and qpdf version is 8.02.

RE: qpdf or pdftk or gs???? - Added by Alexis Bienvenüe over 5 years ago

qpdf was added because pdftk was dropped on Ubuntu (see https://bugs.launchpad.net/bugs/1757314).
I did not test for timings, and did not realize that qpdf was so slow because I don't have so large exams.
I think I can upgrade gs to be the default choice (if installed).

RE: qpdf or pdftk or gs???? - Added by Alexis Bienvenüe over 5 years ago

When using PDF forms however, gs removes the forms when splitting the PDF file to individual questionnaries, so that qpdf or pdftk must be used. But I think this is the only use case where gs leads to problems.

RE: qpdf or pdftk or gs???? - Added by S. McKay over 5 years ago

Thanks for the info. I don't use PDF forms, so I didn't know about that problem.
Hopefully, we can get pdftk back soon. Or qpdf has an update that speeds it up.
You probably know this, so sorry for mentioning it if you do, but there is a
pdftk-java (https://tracker.debian.org/pkg/pdftk-java) in debian testing right now,
that removes the dependencies of pdftk from gcj, and compiles in java directly.
It sounds like it is working, but they are tweaking the wrapper. So, hopefully this
will be a temporary problem.

I am willing to test pdftk-java if I can figure out how to install it on my machine,
but since I don't use it with pdf forms, I may not be the best person to do so ...

RE: qpdf or pdftk or gs???? - Added by Alexis Bienvenüe over 5 years ago

The pdftk-java package from debian seems to handle PDF forms correctly. pdftk is now a virtual package so that at present requesting pdftk installs pdftk-java.

(1-5/5)