问一下有没有用在asp.net中的Word转 PDF插件。一般Word转PDF有哪些方法?
解决方案 »
- 为什么Regex.Match("a1a23b", "[0-9]{3}").Index返回的是零?
- c# form 窗体如何实现子窗体的标题显示在主窗体的菜单栏???
- xml导入oracle
- 怎么获取域用户的登录名
- 遇到了一个难题!
- Nsis 打包问题
- 紧急提问:发布程序时提示"CIMS.exe - common language Rutime Debugging Services"...错误!
- Hashtable的疑惑
- SQL Server 不存在或访问被拒绝。怎么回事呢?
- c# ReportDocument 类执行方法PrintToPrinter()方法时报错
- 如何获取Excel中的UserFrom?
- 怎么把string类型数据传进INT类型的数据库列中
public static void TransformFile(string filepath){
string fppath = System.Configuration.ConfigurationManager.AppSettings["Flashpaper"];
string outpath = filepath.Substring(0, filepath.LastIndexOf('.')) + ".pdf";
string param = fppath + " " + filepath + " -o " + outpath;
Process p = new Process();
p.StartInfo.FileName = "C:\\WINDOWS\\system32\\cmd.exe";
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;
try
{
p.Start();
string strOutput = null;
p.StandardInput.WriteLine(param);
p.StandardInput.WriteLine("exit");
strOutput = p.StandardOutput.ReadToEnd();
Console.WriteLine(strOutput);
p.WaitForExit();
p.Close();
}
catch (Exception ex)
{
throw ex;
}
}