Trying to fix "generateOrDownload" when there are multiple versions of generated PDFs