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
Hi,
I am using the converter ,
I have installed openoffice3
openofffice path : /opt/openoffice.org3/program/python
my unoconv is in my projects root directory and i created a doctopdf text file and run that file using exec() form a function in my project.
The content of doctopdf text file is as follows
I got same error in php, but I solved problem with 'running a unoconv listener', and It refer to Kopz Kyoto's answer
launch a unoconv listener sudo unoconv --listener
do transcode by call unoconv unoconv -f docx file.doc
when i execute the same command in terminal or using python to execute, it's ok.
I guess: my php is called by apache2 which belongs to www-data group, so it hasn't permission to call LibreOffice(unoconv will call LibreOffice to transcode), so there are some ways to solve the prblem:
grant permission to LibreOffice so that it can be called by which source process from www-data group;
launch a unoconv listener process to receive transcode request (Kopz Kyoto's answer, i preference this way).
Hi,
I am using the converter ,
I have installed openoffice3
openofffice path : /opt/openoffice.org3/program/python
my unoconv is in my projects root directory and i created a doctopdf text file and run that file using exec() form a function in my project.
The content of doctopdf text file is as follows
directory=$1
filename=$2
extension=$3
SERVICE='soffice'
if [ "
ps ax|grep -v grep|grep -c $SERVICE
" -lt 1 ]; thenunset DISPLAY
/opt/openoffice.org3/program ./soffice.bin -headless -accept="socket,host=127.0.0.1,port=2002;urp;" -nofirststartwizard -display 0.0 &
sleep 5s
fi
/opt/openoffice.org3/program/python unoconv -f $directory$filename.pdf $directory$filename.$extension
But am getting the error
Error: Unable to connect or start own listener. Aborting.
Please help
Thanks in advance
The text was updated successfully, but these errors were encountered: