How can I specify name for the pdf file that will be downloaded

Hello there, I am using version 7.2.1

I am using instance.downloadPdf(); to download pdf file. when I download a pdf file with this specified code the file is named as document.pdf. But I want to override the file name. How can I achieve that?

Hello, Iā€™m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Hi there!

As per the documentation, you can pass a filename option like so:

instance.downloadPdf({
   filename: 'myfilename.pdf'
})

Thanks!
Logan

1 Like