string FlashPaperPath = @"D:\flashpaper\FlashPaper2.2\FlashPrinter.exe "; Process p = new Process(); p.StartInfo.FileName = "cmd"; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardInput = true; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardError = true; p.StartInfo.CreateNoWindow = true; p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; p.Start(); string strOutput = null; string s = FlashPaperPath + (fromPath) + " -o " + (toPath); p.StandardInput.WriteLine(s); p.StandardInput.WriteLine("exit"); strOutput = p.StandardOutput.ReadToEnd(); Console.WriteLine(strOutput); p.WaitForExit(); p.Close();
if (IsDelete)
{
System.IO.File.Delete(fromPath);
}使用VS2008 调试的时候,可以转换 office2003 和office 2007的版本文件 包括 pptx xlsx docx doc ppt 等等
但是发布到IIS下之后 就不识别ppt pptx docx了 只认得doc
确认文件是否存在勾去掉了
又把NETWORK_SERVICE 加到administrators下
但是不行
application/vnd.openxmlformats-officedocument.wordprocessingml.document
这是我这里的配置
但是就是一直卡着 我把进程结束 就会执行转换之后的代码了
正常情况是会打开2个FlashPaper。exe进程和一个 WINWORD.EXE
有问题的时候只打开1个FlashPaper.EXE和一个WINWORD.EXE
IIS7,windows2008下面你成功了马? 成功的话怎么解决的?