首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

C# Word to PDF有关问题

2012-03-09 
C# Word to PDF问题问一下有没有用在asp.net中的Word转 PDF插件。一般Word转PDF有哪些方法?[解决办法]C# co

C# Word to PDF问题
问一下有没有用在asp.net中的Word转 PDF插件。

一般Word转PDF有哪些方法?

[解决办法]

C# code
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;}}
[解决办法]
http://www.sautinsoft.com/convert-rtf-html-doc-docx-xls-xlsx-ppt-to-pdf-net-library/overview.php
[解决办法]
http://www.west263.com/info/html/wangluobiancheng/DotNetBianCheng/20080222/8523_2.html
[解决办法]
你可以下载一个比如:CutePDF之类的转换器。再用PDF打印就可以。
[解决办法]
OpenOffice或者Office 2007都可以转化的
[解决办法]
一般都是安装PDF pro后直接打印成PDF

热点排行