Почему php exec() завершается с ошибкой.tex→xelatex→.pdf, но с успехом.tex→xelatex→.xdv→xdvipdfmx→.pdf?
Зов команды:
$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-файл абсолютно действительным. В чем подвох?
1 ответ
xelatex нужны свои "помощники", например, исполняемый файл xdvipdfmx, чтобы быть в PATH среды PHP