returning pdfFilename with generatePdf() and generate().