Thanks ..
I changed
// Run LaTeX #$cmd = $command . ' -interaction=batchmode -quiet '.'\input ' . wfEscapeShellArg( "$fn.tex" ) . ' 2>&1';
to $cmd = $command . ' -interaction=batchmode -quiet '.wfEscapeShellArg( "$fn.tex" );
now it works.
Greetings