1.flash版(借助flexpaper工具)
可以把pdf文件用pdf2swf工具转换成swf文件。下载地址
转换代码如下:
1 public void PDFConvertToSWF(string sourcePath, string targetPath) 2 { 3 Process p = new Process(); 4 p.StartInfo.FileName = "cmd.exe"; 5 p.StartInfo.WorkingDirectory = "C:\\WINDOWS\\system32"; 6 p.StartInfo.UseShellExecute = false; 7 p.StartInfo.RedirectStandardInput = true; 8 p.StartInfo.RedirectStandardOutput = true; 9 p.StartInfo.RedirectStandardError = true;10 p.StartInfo.CreateNoWindow = true;11 p.Start();12 //如果碰到语言问题可用这行代码13 //string cmd = "C:/pdf2swf.exe" + " " + sourcePath + " -o " + targetPath + " C:/xpdf/chinese-simplified";14 //如果碰到版本问题可用这行代码15 string cmd = "C:/pdf2swf.exe" + " " + sourcePath + " -s flashversion=9 -o " + targetPath;16 p.StandardInput.WriteLine(cmd);17 p.StandardInput.WriteLine("exit");18 p.Close();19 }
转换成flash之后可以用flexpaper预览。下载地址在网页中依次引入:jquery.min.js,flexpaper.js,flexpaper_handlers.js。同时要注意FlexPaperViewer.swf文件的位置
然后就是配置:
1