How can I use the programme way to export grid pdf?

How can I use the programme way to export grid pdf?
I want to export different grid pdf files once time. so I need a way to export the grid to a pdf file and pack them and download them together.

Is there someone who has experience with this kind of issue?
I think this function very useful if we can export a lot of forms in pdf format once time.

Hi, nevert tried, but if you set the grid to generate the PDF when called, then try to use file_get_contents to save the file PDF, when you have saved all the grids as PDFs, merge them with a PDF library.