print2flash使用
来源:互联网 发布:淘宝严禁出售黄赌毒 编辑:程序博客网 时间:2024/06/06 19:12
使用print2flah转换文档为flash制作在线预览。
1、首先引用Interop.Print2Flash3.dll。
2、IServer server=new Server();//声明并初始化转换服务器类
server.SetP2FPrinterAsDefault();//设置问默认的虚拟打印机
if(server.Skins["custom_chainan"]==null)
{
server.Skins.Add("custom_chainan");
}
ISkin skin=(ISkin) server.Skins["custom_chainan"];
skin.SetToolbarImage(TOOLBAR_IMAGE,IMGLOGO,@"C:\siteIcon.png");//必须为png格式的图片全名;更改转出来的logo图片
skin.HelpButtonURL="http://blog.csdn.net/chainan1988";
skin.LogoURL="http://blog.csdn.net/chainan1988";
skin.ApplyChanges();
Print2Flash3.INTERFACE_OPTION interfaceOption=(Print2Flash3.INTERFACE_OPTION)server.DefaultProfile.InterfaceOptions;
server.DefaultProfile.InterfaceOptions=(int) (interfaceOption&~Print2Flash3.INTERFACE_OPTION.INTLOGO);//去掉logo图片(可选),这样的话上面设置logo图片就看不到效果
转换单个文档
server.ConvertFile(@"test.txt",@"test.txt.swf");//转换单个文档,第一个参数是要转换的文档名,第二个是转换后的文档名
转换批量文档
IBatchProcessingOptions batchOptions = new BatchProcessingOptions();
batchOptions.ActivityTimeout =1000;
batchOptions.AfterPrintingTimeout =1000;
batchOptions.BeforePrintingTimeout = 1000;
batchOptions.PrintingTimeout = 1000;
batchOptions.KillProcessIfTimeout = ThreeStateFlag.TSF_AUTO;
batchOptions.PressPrintButton = ThreeStateFlag.TSF_AUTO;
batchOptions.KillProcessIfTimeout = ThreeStateFlag.TSF_AUTO;
batchOptions.KeepAutomationAppRef = APPLICATIONTYPE.ALL;
batchOptions.KillAllAutomationProcesses = ThreeStateFlag.TSF_AUTO;
batchOptions.CreateLogFile = true;
batchOptions.LogFileName = "log.log";
batchOptions.LoggingLevel = 1;//设置日志级别
batchOptions.ApplyChanges();
server.ConvertDir(@"c:\input",null,@"c:\output", Type.Missing,Type.Missing, Type.Missing, Type.Missing);
获得转换结果错误数量:server.ErrorCount
获得转换文档数:server.FilesConverted
print2flash 64位安装程序
- print2flash使用
- Print2Flash的工作原理与入门使用
- 文档转换软件Print2Flash超链接的使用
- 文档格式转换软件Print2Flash使用教程:超链接
- Print2Flash 2.3
- 文件格式转换工具Print2Flash
- Print2Flash与FlashPaper功能对比详情
- Print2Flash 3汉化破解版下载
- 浅谈print2flash的在线预览转换应用
- Print2Flash出现"System Error. Code:1722. RPC服务器不可用."错误解决办法
- 【JAVA】java代码实现print2Flash转swf文件,百度文库一样。
- print2flash实现将word文档转换成swf,网页直接预览
- 使用
- 使用
- 使用
- 使用
- 使用
- 使用
- 做网页在IE中能够居中但在火狐Firefox中不能居中解决办法
- 广播的发送程序
- android 项目收获01
- 关于map的知识点
- android 项目收获02
- print2flash使用
- 水晶报表运行时安装 CRRedist2008_x86.msi文件位置
- 解析ParseCommandLine
- 天气预报 获取九天系统时间的代码
- 如何在32位ubuntu11.10 下编译android 4.0.1源码和goldfish内核
- outlook不能发邮件0x800CCC80
- Query Error : Can't find FULLTEXT index matching the column list (1191)
- PostgreSQL 交互终端
- Linux网络编程 -- select/epoll得知socket有数据可读,如何判断数据全部被读取完毕?