I am working with dhtmlxGrid PRO version 2.6 and would like to know how to do to export the Grid to PDF without opening it, just save it with a different name than generate.php if not the names Document1.pdf in any directory and does not open the generate.php new window only run.
In file gridPdfWrapper.php you can find code which output grid:
$this->cb->Output(‘grid.pdf’, ‘I’);
grid.pdf - name of generated file (You can use generate it dynamically)
The second parameter means output type:
I: send the file inline to the browser (default). The plug-in is used if available. The name given by name is used when one selects the “Save as” option on the link generating the PDF.
D: send to the browser and force a file download with the name given by name.
F: save to a local file with the name given by name.
S: return the document as a string. name is ignored.
So try changing this parameters to have result which you like.