Hi,
I propose to use wkhtmltopdf to get PDFs fast. I wrote a Java program to demonstrate that:
https://sourceforge.net/p/wb2pdf/git/ci/master/tree/src/Tachyon.java
the demo run on the following book
https://en.wikipedia.org/wiki/Book:Ancient_Egyptian_Titulary
sudo apt-get install wkhtmltopdf javac Tachyon.java time java Tachyon real 0m5.013s user 0m3.509s sys 0m0.146s evince output.pdf
Yours Dirk