Hi,
for some time now i am trying to get unoconv to work with a windows setup.
Unoconv is actually working but not with integration to RS.
I installed Libre Office, set a PATH variable for the system to know where python is located, set UNO_PATH for unoconv to know where Libre Office is.
I set $unoconv_path in config.php to point to the unoconv python script.
I changed in preview_preprocessing.php:
global $unoconv_extensions;
if (in_array($extension,$unoconv_extensions) && isset($unoconv_path) && !isset($newfile))
{
$unocommand="python ". $unoconv_path . "/unoconv";
#if (!file_exists($unocommand)) {exit("Unoconv executable not found at '$unoconv_path'");}
run_command($unocommand . " --format=pdf " . escapeshellarg($file));
$path_parts=pathinfo($file);
$basename_minus_extension=remove_extension($path_parts['basename']);
$pdffile=$path_parts['dirname']."/".$basename_minus_extension.".pdf";
if (file_exists($pdffile))
I changed in general.php:
Line 90:
# Fetching the file path? Add the full path to the file
$filefolder=$storagedir . "" . $folder;
I removed the "/" from the path as unoconv wasn't able to recognize path with"//" in it.
Now when i try to update previews with an existing docx i get the following log:
2013-06-29 09:11:06 Starting preview preprocessing. File extension is docx.
2013-06-29 09:11:06 CLI command: python D:\web\unoconv/unoconv --format=pdf "D:\web/apps/resourcespace/htdocs/filestore/3_2f513a34a2ffd64/3_bdb92bae5259160.docx"
2013-06-29 09:11:06 CLI command: unzip -p "D:\web/apps/resourcespace/htdocs/filestore/3_2f513a34a2ffd64/3_bdb92bae5259160.docx" "docProps/thumbnail.jpeg" > D:\web/apps/resourcespace/htdocs/filestore/3_2f513a34a2ffd64/3_bdb92bae5259160.jpg
2013-06-29 09:11:06 create_previews(ref=3,thumbonly=,extension=jpg,previewonly=,previewbased=,alternative=-1)
2013-06-29 09:11:06 SQL: update resource set file_checksum='' where ref='3'
2013-06-29 09:11:06 SQL: update resource set preview_tweaks = '0|1' where ref = '3'
2013-06-29 09:11:06 File source is D:\web/apps/resourcespace/htdocs/filestore/3_2f513a34a2ffd64/3_bdb92bae5259160.jpg
But no pdf is created.
Now when i just copy and paste the cli command from the log
python D:\web\unoconv/unoconv --format=pdf "D:\web/apps/resourcespace/htdocs/filestore/3_2f513a34a2ffd64/3_bdb92bae5259160.docx"
into cmd voila it works! The pdf is generated inside the folder.
Has anyone a clue what i'm doing wrong? Has anyone EVER succesfully get unoconv to work with windows?
Thanks for any help on this!
Robert