PHP PDF/Excel Generator and save to disk


Is there a way that I can call either PDF or Excel generate.php from the command line and do the following:

  1. Pass the name of a previously created xml file (properly formatted so the generator can process correctly).
  2. Have the generator save the file to the disk rather than outputting to the browser.

I know I can create the xml correctly so the generator.php can load it. I just want to be able to call generate.php from the command line and have the system save it to the disk.

I would like to be able to do the same for PDF as well as Excel.

d:\php\php.exe grid-pdf-php\generate.php {input.xml} {output.pdf}

Can it be done?

Thanks, Sam