日期:2014-05-17 浏览次数:20481 次
string exe =@"C:\SWFTools\pdf2swf.exe"; //SWFTools程序路径 if (!File.Exists(exe)) { throw new ApplicationException("Can not find: " + exe); } StringBuilder sb = new StringBuilder(); sb.Append(" -o\"" + swfPath + "\"");//swf路径 sb.Append(" -z"); sb.Append(" -b"); sb.Append(" -s disablelinks");//禁止PDF里面的链接 sb.Append(" -p " + "1" + "-" + page); sb.Append(" -j 100"); sb.Append(" \"" + pdfPath + "\"");//pdf路径 System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = exe; proc.StartInfo.Arguments = sb.ToString(); proc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; proc.Start(); proc.WaitForExit();