How can I generate a PDF from a folder?