improved downloadPDF - multiple resources