【发布时间】:2015-01-05 00:42:11
【问题描述】:
4.3 版
在 C# 中,我尝试使用 headless 选项将 XLSX 转换为 PDF,但是当我从 ASP.NET 或简单的命令提示符运行它时没有任何反应。
var pdfProcess = new Process();
pdfProcess.StartInfo.FileName = exe;
pdfProcess.StartInfo.Arguments = param + " \"" + fullDocPath +"\"";
pdfProcess.Start();
exe 和参数在哪里:
C:\Program Files (x86)\LibreOffice 4\program\soffice.exe
-norestore -nofirststartwizard -nologo -headless -convert-to pdf "c:\UDS_Docs\temp\Teller Roster National.xlsx"
我使用 GUI 测试了 LibreOffice 可以转换文件并且工作正常。
【问题讨论】:
标签: c# asp.net-mvc pdf libreoffice