
FlashPaper转doc为swf问题
ASP.NET做的小程序,点击按钮把上传的doc文件转成swf文件存到某一目录下,但是在存入数据库的时候可以存入路径,而目录下并没有swf文件,这是怎么回事?...
ASP.NET做的小程序,点击按钮把上传的doc文件转成swf文件存到某一目录下,但是在存入数据库的时候可以存入路径,而目录下并没有swf文件,这是怎么回事?
展开
1个回答
展开全部
不知道. 我以前用过的代码. 不过是控制台运行的.
public static void TransformByFrint2Flash(string filepath, string filename, string targetFolder)
{
string fppath = @"p2fServer.exe";
//string outpath = filepath.Substring(0, filepath.LastIndexOf('.')) + ".swf";
string inpath = filepath + "\\" + filename;
string outpath = targetFolder + filename.Substring(0, filename.LastIndexOf('.')) + ".swf";
string param = fppath + " " + inpath + " " + outpath;
Process p = new Process();
p.StartInfo.WorkingDirectory = @"D:\Program Files\Print2Flash3\";
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;
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询