4,819
社区成员




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;
}
}