博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在线预览文件(pdf)
阅读量:7026 次
发布时间:2019-06-28

本文共 1142 字,大约阅读时间需要 3 分钟。

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 
配置代码

 

 

 

转载于:https://www.cnblogs.com/langmanshuyuan/p/3520952.html

你可能感兴趣的文章
java较全的面试题
查看>>
day3
查看>>
软件程序编码
查看>>
感觉好累
查看>>
使用ant制作hadoop1.1.2的eclipse插件(转载)
查看>>
Css的transform和transition
查看>>
POJ1386Play on Words(欧拉回路)
查看>>
configparser 文件的生成和读写
查看>>
20个PHP程序性能优化的方法
查看>>
关于游戏平衡性工作内容——王者荣耀英雄伤害附录
查看>>
47种常见的浏览器兼容性问题大汇总
查看>>
数据结构与算法预热--线性表是什么?
查看>>
Winform自定义控件实例
查看>>
Siebel NextRecord And DeleteRecord In Loops Skips Record
查看>>
batch normalization在测试时的问题
查看>>
Python时间和日期
查看>>
【BZOJ4298】[ONTAK2015]Bajtocja
查看>>
为什么C语言中int的表示范围是-32768~32767
查看>>
有关位运算的基础知识和应用
查看>>
框架dubbox的简单使用
查看>>