问一下有没有用在asp.net中的Word转 PDF插件。一般Word转PDF有哪些方法?

解决方案 »

  1.   


    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;
    }
    }
      

  2.   

    http://www.sautinsoft.com/convert-rtf-html-doc-docx-xls-xlsx-ppt-to-pdf-net-library/overview.php
      

  3.   

    http://www.west263.com/info/html/wangluobiancheng/DotNetBianCheng/20080222/8523_2.html
      

  4.   

    你可以下载一个比如:CutePDF之类的转换器。再用PDF打印就可以。
      

  5.   

    OpenOffice或者Office 2007都可以转化的
      

  6.   

    一般都是安装PDF pro后直接打印成PDF