unoconv

linux下用php将doc、ppt转图片

核能气质少年 提交于 2020-11-26 09:28:57
解决方案分成两步:   (1)调用unoconv命令将 doc、ppt 转 pdf   (2)使用 imagemagick将 pdf 转图片 步骤 1.安装unoconv sudo apt- get install unoconv 安装是否成功 unoconv --version 2.安装imagemagick sudo apt- get install imagemagick 是否安装成功 convert -version 3.测试   (1)将odt文件转成pdf文件 unoconv -f pdf test.docx   (2)将pdf转成图片(jpg) convert XXX.pdf %d.jpg    %d是按页进行转换 4.php调用shell命令进行转换 <? php exec( " unoconv -f pdf test.docx " ); exec( " convert test.pdf %d.jpg " ); 补充 1.如果出现错误:   convert: not authorized `test.pdf' @ error/constitute.c/ReadImage/412.   convert: no images defined `%d.jpg' @ error/convert.c/ConvertImageCommand/3210.   解决方案:  

centos php ppt转图片

左心房为你撑大大i 提交于 2020-02-26 05:34:42
参考: https://blog.csdn.net/aituochang1886/article/details/101167564 安装 Unoconv 参考: https://www.licongying.cn/2018/10/linux-centos-install-unoconv-liboffice/ https://blog.csdn.net/qq_42975335/article/details/102747587 安装 ImageMagick 参考: https://www.cnblogs.com/yzeng/p/11569598.html https://blog.csdn.net/mytt_10566/article/details/80902059 报错解决方案: convert: error while loading shared libraries: libMagickCore-7.Q16HDRI.so.7: cannot open shared object file: No such file or directory https://blog.csdn.net/lvshuocool/article/details/89455700 convert: no images defined `ffcl.png' @ error/convert.c

Unoconv convert excel to csv with semicolon without quotes

萝らか妹 提交于 2020-02-05 06:56:09
问题 I'm doing a simple command for convert excel to csv with semicolon unoconv -f csv -e FilterOptions="59,34,0,1" filex.xlsx but the results appears with quotes like this "name";"lastname";"age" How could I convert without quotes? 回答1: I solve with this unoconv -f csv -e FilterOptions="59,0,0,1" filex.xlsx I use this wiki https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options#Token_8.2C_csv_import 来源: https://stackoverflow.com/questions/43237305/unoconv-convert-excel

Using two commands (using pipe |) with spawn

余生长醉 提交于 2019-12-07 13:05:06
问题 I'm converting a doc to a pdf (unoconv) in memory and printing (pdftotext) in the terminal with: unoconv -f pdf --stdout sample.doc | pdftotext -layout -enc UTF-8 - out.txt Is working. Now i want use this command with child_process.spawn : let filePath = "...", process = child_process.spawn("unoconv", [ "-f", "pdf", "--stdout", filePath, "|", "pdftotext", "-layout", "-enc", "UTF-8", "-", "-" ]); In this case, only the first command (before the |) is working. Is i possible to do what i'm

Using two commands (using pipe |) with spawn

偶尔善良 提交于 2019-12-06 03:54:22
I'm converting a doc to a pdf (unoconv) in memory and printing (pdftotext) in the terminal with: unoconv -f pdf --stdout sample.doc | pdftotext -layout -enc UTF-8 - out.txt Is working. Now i want use this command with child_process.spawn : let filePath = "...", process = child_process.spawn("unoconv", [ "-f", "pdf", "--stdout", filePath, "|", "pdftotext", "-layout", "-enc", "UTF-8", "-", "-" ]); In this case, only the first command (before the |) is working. Is i possible to do what i'm trying? Thanks. UPDATE- Result of: sh -c- .... bash-3.2$ sh -c- unoconv -f pdf --stdout /Users/fatimaalves