By default Pd4Php outputs to STDOUT. The output can be redirected in UNIX-style to any file with
">filename" at the end of the command line.
passthru('java -Xmx512m -Djava.awt.headless=true -cp .:pd4ml_demo.jar Pd4Php \'' .
$_POST['url'] . '\' 800 A4 2>>stderr.txt >/path/file.pdf');As I remember the actual versions of Pd4Php support also
"-out filename" parameter:
passthru('java -Xmx512m -Djava.awt.headless=true -cp .:pd4ml_demo.jar Pd4Php \'' .
$_POST['url'] . '\' 800 A4 -out /path/file.pdf 2>>stderr.txt');