<!--首先要引入jquery库及相关的js-->
2 <script type="text/javascript" src=js/jquery.js"></script>
3 <script type=js/flexpaper_flash.js
4 <script type=js/flexpaper_flash_debug.js"></script>
<body>
<div style=position:absolute;left:10px;top:10px;">
<a id=viewerPlaceHolder" style=width:660px;height:480px;display:block"></a>
<script type=">
var fp = new FlexPaperViewer(
'FlexPaperViewer',ajax.swf'),<!--这句是关键: SwfFile: 指示导入的.swf的路径-->
Scale : 0.6,ZoomTransition : eaSEOut0.5,ZoomInterval : 0.2,FitPageOnLoad : true,FitWidthOnLoad : false,PrintEnabled : 5,SearchMatchAll : Portraittrue,
localeChain: en_US'
}});
</script>
</div>
</body>
1 private static void ConvertCmd(string fileName)
2 {
3
4 using (Process p = new Process())
5 {
6 string cmdStr = HttpContext.Current.Server.MapPath(~/SWFTools/pdf2swf.exe");
7 string savePath = HttpContext.Current.Server.MapPath(~/TestSWF/ 8 // @"""" 相当于一个双引号,之所以要加@"""" 就是为了防止要转换的过程中,文件夹名字带有空格,导致失败
9 string sourcePath = @"""" + savePath + fileName + ";
10 string targetPath = " + savePath + fileName.Substring(0,fileName.LastIndexOf(.")) + .swf" + 11 string argsStr = -t " + sourcePath + -s flashversion=9 -o " + targetPath;
12 调用新进程 进行转换13 ProcessStartInfo psi = new ProcessStartInfo(cmdStr,argsStr);
14 p.StartInfo = psi;
15 p.Start();
16 p.WaitForExit();
17 }
18 }