Generate right PDF file.

Everything works good but for too many books
program produces memory error. When everything
is in RAM, fork and compilation can't be done.