added method to generate document PDFs on the fly using LibTIFF tools