libreoffice转成pdf
libreoffice 把word excel转成pdf
soffice.bin --headless --convert-to pdf --outdir d:\tmp C:\Users\youtun\Documents\说明文档20200629.docx
不详细的地方, 使用soffice.bin --help查看参数说明

libreoffice5.3安装日志
yum install --nogpgcheck*.rpm
try to run libreoffice5.3,
display no JRE found, and a lib.so is lost.
after install the lib.so, it success ??
Error log:

[root@data-service ~]# libreoffice5.3
Failed to open display
javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx
/opt/libreoffice5.3/program/soffice.bin: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
yum install mesa-libGL

this lib is a perl lib, **libGL **is a part of openGL which used to draw a picture.
Right Log:

JRE is not reuqired, and the jodconvert excel to pdf is success.
PDF操作常用库:
https://templated.io/blog/how-to-convert-html-to-pdf-with-java/
https://www.jianshu.com/p/d952d837af0e wkhtmltopdf wkhtmltoimage
https://github.com/wkhtmltopdf/wkhtmltopdf 使用webkit内核渲染

浙公网安备 33010602011771号