asp.net 调用FlashPrinter.exe 把所有可打印的文件转换成swf文件 运行没有效果
FlashPaper 2 软件直接本地可以使用,但代码运行没有效果。
网上说改Macromedia FlashPape端口,应为FlashPape2PrinterPort,如果是LPT1这个端口不行,怎么修改?
不要发一下理论,今天看理论都烦。。。先谢了!
网上说改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");
//}
}
不要发一下理论,今天看理论都烦。。。先谢了!
...全文
相关推荐
word在线阅读
该项目实现了一个Word在线阅读功能,核心是将PDF文件转换为SWF格式以便网页嵌入浏览。通过调用pdf2swf工具和FlashPrinter.exe进行文件转换,并利用FlexPaper Viewe
用flashprinter实现office文档在线转flash
本文介绍了如何在ASP.NET页面中通过按钮点击事件调用FlashPaper.exe,将Office文档转换为SWF格式,并保存到指定路径。
使用FlashPaper在线转换.doc为.swf
这是由于默认情况下,ASP.NET账号没有权限操作Microsoft Office对象。解决这个问题有多种方法:1.
asp.net在线预览
配置Web.Config文件为了确保ASP.NET应用程序能够正确调用FlashPaper工具,需要对Web.Config文件进行相应的配置。具体步骤如下:- 打开项目中的Web.Config文件。
格式转换__txt,doc,JPG等转为SWF或pdf转Flash
确保组件被放置在与FlashPaper的其他可执行文件相同的目录下,以便于调用。4. **服务器端脚本调用**:在服务器端的脚本语言中,如ASP、JSP或PHP,调用DLL组件来执行转换任务。


