The call of command:
$dir = "/path/to/source/file";
exec("cd $dir;xelatex filesource.tex", $output_array[0]);
always fails, but:
$dir = "/path/to/source/file";
exec("cd $dir;/usr/texbin/xelatex -no-pdf filesource.tex", $output_array[0]);// now we have .xdv file
exec("cd $dir;/usr/texbin/xdvipdfmx filesource.xdv", $output_array[1]);
succeed, and result .pdf file absolutely valid. What is the trick?
xdvipdfmx
process and pipes shipped out pages to it, unless--no-pdf
is specified. It's possible that this foolsexec
. – egreg Oct 29 '13 at 8:56