调用libreoffice将ppt、word转换成pdf文件
soffice_path = ""
systype = platform.system()
if systype == "Linux":
soffice_path = "/usr/bin/soffice"
elif systype == "Windows":
soffice_path = "C:\\Program Files (x86)\\LibreOffice 5\\program\\soffice"
status = subprocess.call([
soffice_path,
"--headless",
"--invisible",
"--convert-to",
"pdf",
"--outdir",
outdir,
infilename.decode("utf-8").encode(sys.getfilesystemencoding())
])
