You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this command: exec('OfficeToPDF.exe {path}\TEST.docx {path}\TEST.pdf /verbose', $output);
I get this value for $output:
Converting with Word converter
Object reference not set to an instance of an object.
Did not convert
And the file does not convert.
However, when running this command directly from CMD or powershell: OfficeToPDF.exe {path}\TEST.docx {path}\TEST.pdf /verbose
It works perfectly. What am I doing wrong?
The text was updated successfully, but these errors were encountered:
I would also like to mention, I have added OfficeToPDF.exe to my path, and I've also tried shell_exec() and system() commands which both give the same error.
I think some how you have to run officeToPdf like SYSTEM user.
When you run it from console with your windows user it runs ok, no?
When you run it from the web your System user is running the script.
Try logging the user when you run it:
With this command:
exec('OfficeToPDF.exe {path}\TEST.docx {path}\TEST.pdf /verbose', $output);
I get this value for
$output
:And the file does not convert.
However, when running this command directly from CMD or powershell:
OfficeToPDF.exe {path}\TEST.docx {path}\TEST.pdf /verbose
It works perfectly. What am I doing wrong?
The text was updated successfully, but these errors were encountered: