flashpaper2.2 asp.net win2003 iis 配置解决方案

flashpaper2.2 需要先点击“初始化”文件夹下的“初始化.bat”文件进行初始化,才能正常使用。

代码如下:

 1 public static void SwfConvert(string URL)     {
 2 
 3         Process process = new Process();     //创建进程对象
 4 
 5         ProcessStartInfo startInfo = new ProcessStartInfo();
 6 
 7         string paperroot = HttpContext.Current.Server.MapPath("~/FlashPaper2.2") + "\\FlashPrinter.exe";
 8 
 9         string storFile = string.Format(@"{0}{1}", HttpContext.Current.Server.MapPath("~/upload/tmp/"), URL);
10 
11         string swfFile = HttpContext.Current.Server.MapPath("~/upload/swf/") + Path.ChangeExtension(URL, ".swf");
12 
13         startInfo.FileName = paperroot;
14 
15         startInfo.Arguments = storFile + " -o " + swfFile;
16 
17         startInfo.UseShellExecute = false;     //不使用系统外壳程序启动
18 
19         startInfo.RedirectStandardInput = false;   //不重定向输入
20 
21         startInfo.RedirectStandardOutput = false;   //重定向输出
22 
23         startInfo.CreateNoWindow = true;     //不创建窗口
24 
25         process.StartInfo = startInfo;         process.Start();
26 
27         startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;  //隐藏窗口  
28 
29         process.WaitForExit(3000);         process.Close(); //关掉线程
30 
31         }

----------------------------------------------------------------------------------------------------------

基本软件
1. FlashPaper2.2程序目录
2. 安装Flash player 10.2.152.32
(activex和plugin两个安装程序)
3. 初始化:运行FlashPaper2.2程序目录中的“初始化.bat”
4.
如果转pdf须安装Adobe Reader 9.1或9.2
5. 如果转doc须安装Word 2007

配置方法
1.
检查“Print Spooler”进程开启;
2. 检查“Macromedia FlashPaper”打印机安装正确;
3.
通过本地用户和组管理,将Network service用户(须查找该用户)添加到administrators组中,
执行命令iisrset重启iis;
4.
Word必须是2007,2003需要在DCOM中设置权限,并且不一定能转换成功;

如果仍有问题可能需检查:
1.
转换文档读取和保存的文件夹的读写权限;
2. 打印机权限;
3. aspnet用户添加到读写权限;
4.
远程打开word等软件的权限;

关于模板
Flashpaper安装目录下有个Interface文件夹,里边的DefaultViewer2.swf就是模板文件。可反编译DefaultViewer2.swf。生成新的DefaultViewer.swf,替换原来的。比如去掉某个功能,去掉或替换logo等;

------------------------------------------------

原文地址:https://www.cnblogs.com/dengqz/p/2645412.html