Threads for PDF generation. Picture now optional