print2flash 4.0版本选择,用过的指导一下
在windows2008服务器的环境中,配置完print2flash和组件服务后。用控制台来自动执行转换,不知道选择专业版能不能实现以下的程序。服务版本的有点太贵了。
public bool Convert(string InputFileName)
{
try
{
System.Console.WriteLine(InputFileName);
Print2Flash4.Server2 p2fServer = new Print2Flash4.Server2();
p2fServer.DefaultProfile.InterfaceOptions = 4153342;
p2fServer.DefaultProfile.ProtectionOptions = (int)Print2Flash4.PROTECTION_OPTION.PROTENAPI;
p2fServer.DefaultProfile.DocumentType = Print2Flash4.DOCUMENT_TYPE.FLASH;
p2fServer.DefaultBatchProcessingOptions.GenerateExternalViewer = true;
p2fServer.DefaultBatchProcessingOptions.BeforePrintingTimeout = 120000;//设置执行过期时间为2分钟
p2fServer.DefaultBatchProcessingOptions.ExcelOptions.SkipEmptySheets = true;
p2fServer.ConvertFile(InputFileName, InputFileName + ".swf", null, null, null);
return true;
}
catch (Exception ex)
{
string write = InputFileName + ",0,1,0," + DateTime.Now.ToString();
SysLog sl = new SysLog();
sl.WriteLine(write);
sl.WriteLine(ex.ToString());
return false;
}
}
...全文


图表区

