命令召唤:
$dir = "/path/to/source/file";
exec("cd $dir;xelatex filesource.tex", $output_array[0]);
总是失败,但是:
$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]);
成功,结果.pdf文件绝对有效。有什么诀窍?
答案 0 :(得分:1)
xelatex需要其“帮助程序”,例如xdvipdfmx可执行文件位于PHP环境的PATH中