版本:2.2.1

示例:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>  <title>Flexpaper例子</title>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><script type="text/javascript" src="${ctx}/FlexPaper/js/jquery.min.js"></script><script type="text/javascript" src="${ctx}/FlexPaper/js/flexpaper.js"></script><script type="text/javascript" src="${ctx}/FlexPaper/js/flexpaper_handlers.js"></script>
</head>
<body> 
<div id="documentViewer" class="flexpaper_viewer"style="position:absolute;left:10px;top:10px;width:80%;height:80%"></div>
<script type="text/javascript">function getContentPath() {var pathName = document.location.pathname;var index = pathName.substr(1).indexOf("/");var path = pathName.substr(0, index + 1);return path;}var fp = $('#documentViewer').FlexPaperViewer({config: {SwfFile: getContentPath() + '/readme.swf',Scale: 0.6,ZoomTransition: 'easeOut',ZoomTime: 0.5,ZoomInterval: 0.2,FitPageOnLoad: true,FitWidthOnLoad: true,FullScreenAsMaxWindow: true,ProgressiveLoading: true,MinZoomSize: 0.2,MaxZoomSize: 5,SearchMatchAll: false,InitViewMode: 'Portrait',ViewModeToolsVisible: true,ZoomToolsVisible: true,NavToolsVisible: true,CursorToolsVisible: true,SearchToolsVisible: true,localeChain: 'zh_CN',jsDirectory: getContentPath() + "/FlexPaper/js/", /*设置FlexPaper的js文件目录,包含FlexPaperVier.swf文件,否则默认在flex目录下.*/cssDirectory: getContentPath() + "/FlexPaper/css/"}});
</script></body>
</html>

如果不能显示,注意设置jsDirectory和cssDirectory参数。

官网所给出的详细参数:

Parameters

The following parameters can be used in FlexPaper

  SwfFile (String) The flash document FlexPaper should open
  JSONFile (String) The json document FlexPaper should open. Mark the page number with {page} if you are loading FlexPaper in split mode (e.g. Paper.pdf_{page}.js). This only applies to FlexPaper with AdaptiveUI enabled.
  IMGFiles (String) The pages as images FlexPaper should open. Mark page number with {page} (e.g. Paper.pdf_{page}.png}). This only applies to FlexPaper with AdaptiveUI enabled.
  Scale (Number) The initial zoom factor that should be used. Should be a number above 0 (1=100%)
  ZoomTransition (String) The zoom transition that should be used when zooming in FlexPaper. It uses the same Transition modes as the Tweener. The default value is easeOut. Some examples: easenone, easeout, linear, easeoutquad
  ZoomTime (Number) The time it should take for the zoom to reach the new zoom factor. Should be 0 or greater.
  ZoomInterval (Number) The interval which the zoom slider should be using. Basically how big the "step" should be between each zoom factor. The default value is 0.1. Should be a positive number.
  FitPageOnLoad (Boolean) Fits the page on initial load. Same effect as using the fit-page button in the toolbar.
  FitWidthOnLoad(Boolean) Fits the width on initial load. Same effect as using the fit-width button in the toolbar.
  localeChain (String) Sets the locale (language) to use. The following languages are currently supported:


en_US (English) 
fr_FR (French) 
zh_CN (Chinese, Simple) 
es_ES (Spanish) 
pt_BR (Brazilian Portugese) 
ru_RU (Russian) 
fi_FN (Finnish) 
de_DE (German) 
nl_NL (Netherlands) 
tr_TR (Turkish) 
se_SE (Swedish) 
pt_PT (Portugese) 
el_EL (Greek) 
dn_DN (Danish) 
cz_CS (Czech) 
it_IT (Italian) 
pl_PL (Polish) 
pv_FN (Finnish) 
hu_HU (Hungarian)
  FullScreenAsMaxWindow(Boolean) With this set to true, clicking on fullscreen will open a new browser window with FlexPaper maximized instead of using true fullscreen. This is a preferred setting when using FlexPaper as flash standalone as the security limitations of the Flash player disables (for security reasons) most of the input controls in true fullscreen.
  ProgressiveLoading(Boolean) Will load and display the document progressively when set to true as opposed to downloading the complete document before displaying the pages. Documents need to be converted to at least Flash version 9 for this to work (-T 9 flag using PDF2SWF).Please observe that this parameter has no effect in FlexPaper Zine. Please use split page loading for large documents in FlexPaper Zine.
  MaxZoomSize (Number) Sets the maximum allowed zoom level
  MinZoomSize (Number) Sets the minimum allowed zoom level
  SearchMatchAll(Boolean) When set to true, the viewer highlights all matches when performing searches in a document.
  InitViewMode (String) Sets the start-up view mode. For example "Portrait" or "TwoPage".
  PrintPaperAsBitmap(Boolean) When set to true, the viewer will print the document as a bitmap as opposed to vectorized
  StartAtPage (Number) Instructs the viewer to start at a specific page
  ViewModeToolsVisible(Boolean) Shows or hides view modes from the tool bar
  ZoomToolsVisible(Boolean) Shows or hides zoom tools from the tool bar
  NavToolsVisible(Boolean) Shows or hides nav tools from the tool bar
  CursorToolsVisible(Boolean) Shows or hides cursor tools from the tool bar
  SearchToolsVisible(Boolean) Shows or hides search tools from the tool bar
  jsDirectory (String) Sets the javascript directory to supplied location. This only applies to FlexPaper with AdaptiveUI enabled.
  cssDirectory (String) Sets the css directory to supplied location. This only applies to FlexPaper with AdaptiveUI enabled.
  localeDirectory (String) Sets the locale directory to supplied location. This only applies to FlexPaper with AdaptiveUI enabled.

The parameters are passed using flashvars or by setting properties on the flexpaper component inside flex, depending on your choice of usage. The code block below shows an example of how the parameters can be passed using the pre-compiled flash version

$('#documentViewer').FlexPaperViewer(         { config : {          SwfFile : "Paper.swf",          IMGFiles : "Paper.pdf_{page}.png",          JSONFile : "Paper.pdf.js",          PDFFile : "Paper.pdf",          Scale : 0.6,          ZoomTransition : "easeOut",          ZoomTime : 0.5,          ZoomInterval : 0.1,          FitPageOnLoad : false,          FitWidthOnLoad : false,          FullScreenAsMaxWindow : true,          ProgressiveLoading : true,          MinZoomSize : 0.2,          MaxZoomSize : 5,          SearchMatchAll : false,          InitViewMode : 'Portrait',

          ViewModeToolsVisible : true,          ZoomToolsVisible : true,          NavToolsVisible : true,          CursorToolsVisible : true,          SearchToolsVisible : true,

          localeChain : "en_US"}});

FlexPaper显示swf文件示例和参数设置相关推荐

  1. python vtk dicom_Python vtk读取并显示dicom文件示例

    因为做项目的原因,所以接触到了医学图像dicom文件.vtk刚开始看,这里仅仅只是其最简单的读取显示功能.此处用到了vtk库,可自行百度安装方法. 下面附上代码: from vtk import * ...

  2. c语言messagebox显示变量,Messagebox.Show()常用参数设置

    private void button1_Click(object sender, EventArgs e) { MessageBox.Show(" 1 个参数 " ); } pr ...

  3. 【Java 网络编程】TCP 数据传输示例 ( 客户端参数设置 | 服务器端参数设置 | ByteBuffer 存放读取数据类型 )

    文章目录 I 客户端代码示例 II 服务器端代码示例 III 运行结果 I 客户端代码示例 import java.io.IOException; import java.io.InputStream ...

  4. php文件上传参数设置

    2019独角兽企业重金招聘Python工程师标准>>> 1 php上传文件首先在php.ini文件中开启文件上传,并且对其中的一些参数作出合理配置. file_uploads = O ...

  5. Eolink上传文件和其他参数设置

    Eolink请求设置,注意几个细节,请求方式,Content-Type等  java后台接收参数 @RequestMapping(value = "savefile", metho ...

  6. 关于手机上显示网页自适应大小viewport参数设置

    目前在做一个手机网页自适应屏幕大小时碰到了问题,传统用以下代码设置网页自适应屏幕大小 <meta name="viewport" content="width=de ...

  7. ASP.NET 用 FlexPaper 在页面上显示 PDF 文件

    必要条件 演示 ASP.NET 用 FlexPaper 在页面上显示 PDF 文件 软件环境 解决方案结构 简单显示 SWF 文件 上传并显示 PDF 文件 常见问题 参考资料 其实,虽说是显示 PD ...

  8. html无法展示swf,flexpaper无法预览swf文件_html/css_WEB-ITnose

    有没有人遇到无法用flexpaper播放swf文件的? 但是这个swf文件又可以用浏览器直接打开. 此swf文件来源是由word用openoffice转换成pdf,再由pdf2swf转换成swf的. ...

  9. roary数据输入,参数设置,结果文件

    1.数据输入 (1)Roary 的输入端需要 gff 格式的数据文件.由于 NCBI 下载的 gff 是不含核酸序列的 gff 格式文件,无法直接用来分析.Prokka 生成的 gff 格式文件包含核 ...

最新文章

  1. 正如孙正义的时间机器的理论
  2. Linux中如何使用gThumb批量调整图片大小
  3. 2.Cannot find config.m4.
  4. 服务器补丁 系统,操作系统补丁服务器
  5. 线程run方法和start方法的区别
  6. 我是一个线程 [转]
  7. a(n+1) = f[a(n)] 型递推数列的迭代作图(玩计算器玩出了问题)
  8. Web的测试内容和方法【转贴】
  9. python基础(1)——简介与安装
  10. [RTOS]--uCOS、FreeRTOS、RTThread、RTX等RTOS的对比之特点
  11. python 省份排序_Python常用的排序
  12. 微计算机的工作原理,一文看懂微流控芯片的工作原理
  13. C语言atan2()函数:求y/x的反正切值
  14. 错误代码1500什么意思_宽带出错出错提示代码是示什么意思
  15. ECCVW 2022 | 第二届城市规模点云语义理解挑战赛
  16. 1.[QT | QCharts | 动态显示]折线图标题字体大小无法更改
  17. list<Map> 转list对象
  18. 亚马逊AWS与凯捷、富通云腾、神州泰岳达成战略合作
  19. 基于51单片机密码锁设计LCD1602液晶仿真DIY电子制作智能
  20. SLAM基础——关于SLAM三大矩阵

热门文章

  1. 2022-2028全球与中国汽车可再生材料市场现状及未来发展趋势
  2. 谷露专访智行者HRBP负责人:无人驾驶蓄势待发, 招聘如何先人一步
  3. < 今日份知识点:Javascript本地存储的方式有哪些?区别及应用场景? >
  4. 华为注册鸿蒙商标的故事,华为注册“鸿蒙”商标:意在把传说化为现实奇迹
  5. Windows 8系统关机的十个方法!推荐收藏!
  6. linux操作系统的文件名最大长度为,linux下文件数、目录数、文件名长度的各种限制...
  7. java编写计算协方差矩阵_协方差矩阵的实例与意义
  8. X86汇编中的结构体STRUCT和UNION
  9. 【系统收藏——德邦证券同花顺 官方版】
  10. 小米员工创富记:熬了5年996 现在面对财富有点懵