仿百度文库、豆丁在线阅读(FlashPaper)参考资料 .

       /// <summary>
        /// 文档转swf
        /// </summary>
        /// <param name="oldFile">文档文件地址</param>
        /// <param name="swfFile">swf地址</param>
        public void ConvertToSWF(string oldFile, string swfFile)
        {
            System.Diagnostics.Process pc = new System.Diagnostics.Process();
            pc.StartInfo.FileName = @"D:\FlashPaper\FlashPrinter.exe";// FlashPrinter安装地址
            pc.StartInfo.Arguments = string.Format("{0} -o {1}", oldFile, swfFile);
            pc.StartInfo.CreateNoWindow = true;
            pc.StartInfo.UseShellExecute = false;
            pc.StartInfo.RedirectStandardInput = false;
            pc.StartInfo.RedirectStandardOutput = false;
            pc.StartInfo.RedirectStandardError = true;
            pc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
            pc.Start();
            pc.WaitForExit();
            pc.Close();
            pc.Dispose();
        }

 

posted @ 2020-03-01 15:44  曾小慧  阅读(178)  评论(0编辑  收藏  举报