asp.net 调用FlashPrinter.exe 把所有可打印的文件转换成swf文件 运行没有效果

lifusong890910 lifusong890910 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
FlashPaper 2 软件直接本地可以使用,但代码运行没有效果。
网上说改Macromedia FlashPape端口,应为FlashPape2PrinterPort,如果是LPT1这个端口不行,怎么修改?



using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text.RegularExpressions;
using System.Text;
using System.Diagnostics;

namespace WebApplication1
{
public partial class WebForm8 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Process process = new Process(); //创建进程对象
//try
//{
ProcessStartInfo startInfo = new ProcessStartInfo();
string paperroot = @"C:\FlashPaper\FlashPrinter.exe";
string docFile = Server.MapPath("Lee.doc");
string swfFile = Server.MapPath("Lee.swf");

startInfo.FileName = paperroot;
startInfo.Arguments = docFile + " -o " + swfFile;
startInfo.UseShellExecute = false; //不使用系统外壳程序启动
startInfo.RedirectStandardInput = false; //不重定向输入
startInfo.RedirectStandardOutput = false; //重定向输出
startInfo.CreateNoWindow = true; //不创建窗口
process.StartInfo = startInfo;

process.Start();


Response.Write("已经提交生成。<br />");
Response.Write(paperroot + "<br />" + docFile + " = " + swfFile);
//}
//catch (Exception ex)
//{
// Response.Write(ex.Message);
//}
//finally
//{
if (process != null)
process.Close();

// Response.Write("<br />finally");
//}

}


不要发一下理论,今天看理论都烦。。。先谢了!
...全文

相关推荐

评论 12
收藏 已收藏
分享
返回顶部
lifusong890910
.NET社区 62,272 成员 668,968 内容