【问题标题】:After installing Libreoffice service on Linux server with ROOT user, normal user cannot call Libreoffice API使用ROOT用户在Linux服务器上安装Libreoffice服务后,普通用户无法调用Libreoffice API
【发布时间】:2021-07-16 08:38:42
【问题描述】:

系统:Centos 7.
以root用户安装Libreoffice服务,切换到普通用户abc调用API时提示。

javaldx failed!
Warning: failed to read path from javaldx

调用指令: /usr/bin/libreoffice7.0 --headless --convert-to pdf a.xlsx --outdir a.pdf

原本打算使用php exec 来执行Libreoffice API 转换PDF 文档的命令。 那么解决办法是什么,可以用普通用户(包括www)调用Libreoffice API?

【问题讨论】:

    标签: php libreoffice xilinx


    【解决方案1】:

    正确答案:

    /usr/bin/libreoffice7 -env:UserInstallation=file:///$HOME/.libreoffice-headless/ --convert-to pdf '.$infile_path.' --outdir '.$outfile_path

    重点是-env:UserInstallation=file:///$HOME/.libreoffice-headless/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-18
      • 2013-06-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-28
      • 1970-01-01
      • 2013-04-27
      相关资源
      最近更新 更多