How to generate a PDF from a folder