HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › PD4ML Tips & Tricks › How to save pdf file directly on disk › Re: Re: How to save pdf file directly on disk
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.
[language=java:1wk8s87x]passthru('java -Xmx512m -Djava.awt.headless=true -cp .:pd4ml_demo.jar Pd4Php '' .
$_POST['url'] . '' 800 A4 2>>stderr.txt >/path/file.pdf');[/language:1wk8s87x]
As I remember the actual versions of Pd4Php support also “-out filename” parameter:
[language=java:1wk8s87x]passthru('java -Xmx512m -Djava.awt.headless=true -cp .:pd4ml_demo.jar Pd4Php '' .
$_POST['url'] . '' 800 A4 -out /path/file.pdf 2>>stderr.txt');[/language:1wk8s87x]