Flexpaper参数,Flexpaper使用方法,Flexpaper下载

Js代码 复制代码 收藏代码
  1. SwfFile (String) 需要使用Flexpaper打开的文档
  2. Scale (Number) 初始化缩放比例,参数值应该是大于零的整数
  3. ZoomTransition (String) Flexpaper中缩放样式,它使用和Tweener一样的样式,默认参数值为easeOut.其他可选值包括: easenone, easeout, linear, easeoutquad
  4. ZoomTime (Number) 从一个缩放比例变为另外一个缩放比例需要花费的时间,该参数值应该为0或更大。
  5. ZoomInterval (Number) 缩放比例之间间隔,默认值为0.1,该值为正数。
  6. FitPageOnLoad (Boolean) 初始化得时候自适应页面,与使用工具栏上的适应页面按钮同样的效果。
  7. FitWidthOnLoad (Boolean) 初始化的时候自适应页面宽度,与工具栏上的适应宽度按钮同样的效果。
  8. localeChain (String) 设置地区(语言),目前支持以下语言。
  9. en_US (English)
  10. fr_FR (French)
  11. zh_CN (Chinese, Simple)
  12. es_ES (Spanish)
  13. pt_BR (Brazilian Portugese)
  14. ru_RU (Russian)
  15. fi_FN (Finnish)
  16. de_DE (German)
  17. nl_NL (Netherlands)
  18. tr_TR (Turkish)
  19. se_SE (Swedish)
  20. pt_PT (Portugese)
  21. el_EL (Greek)
  22. da_DN (Danish)
  23. cz_CS (Czech)
  24. it_IT (Italian)
  25. pl_PL (Polish)
  26. pv_FN (Finnish)
  27. hu_HU (Hungarian)
  28. FullScreenAsMaxWindow (Boolean) 当设置为true的时候,单击全屏按钮会打开一个flexpaper最大化的新窗口而不是全屏,当由于flash播放器因为安全而禁止全屏,而使用flexpaper作为独立的flash播放器的时候设置为true是个优先选择。
  29. ProgressiveLoading (Boolean) 当设置为true的时候,展示文档时不会加载完整个文档,而是逐步加载,但是需要将文档转化为9以上的flash版本(使用pdf2swf的时候使用-T 9 标签)。
  30. MaxZoomSize (Number) 设置最大的缩放比例。
  31. MinZoomSize (Number) 最小的缩放比例。
  32. SearchMatchAll (Boolean) 设置为true的时候,单击搜索所有符合条件的地方高亮显示。
  33. InitViewMode (String) 设置启动模式如"Portrait" or "TwoPage".
  34. ViewModeToolsVisible (Boolean) 工具栏上是否显示样式选择框。
  35. ZoomToolsVisible (Boolean) 工具栏上是否显示缩放工具。
  36. NavToolsVisible (Boolean) 工具栏上是否显示导航工具。
  37. CursorToolsVisible (Boolean) 工具栏上是否显示光标工具。
  38. SearchToolsVisible (Boolean) 工具栏上是否显示搜索。
  39. 对比本例子中的参数设置:
  40. SwfFile : escape('FusionCharts.swf'),//加载的SWF文件为FusionCharts.swf
  41. Scale : 0.6, //初始化缩放比例为0.6,即60%
  42. ZoomTransition : 'easeOut',
  43. ZoomTime : 0.5,
  44. ZoomInterval : 0.2,
  45. FitPageOnLoad : true,//加载时自动适应页面
  46. FitWidthOnLoad : false, //加载时自动适应页面宽度
  47. FullScreenAsMaxWindow : false,
  48. ProgressiveLoading : false,
  49. MinZoomSize : 0.2, //页面最小可缩小成20%
  50. MaxZoomSize : 5, //页面最大可放大成500%
  51. SearchMatchAll : false,
  52. InitViewMode : 'Portrait',
  53. PrintPaperAsBitmap : false,
  54. ViewModeToolsVisible : true,
  55. ZoomToolsVisible : true,
  56. NavToolsVisible : true,
  57. CursorToolsVisible : true,
  58. SearchToolsVisible : true,
  59. localeChain: 'en_US' //设置地区(语言)为en_US
  60. 上面带注解的参数为我们经常设置的参数,下面我们来简单演示一下几个参数改变的效果:
  61. FitWidthOnLoad : false 改成true
  62. MaxZoomSize : 5 改成1
  63. localeChain: 'en_US'改成'zh_CN'

使用例子:

Html代码 复制代码 收藏代码
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  3. <head>
  4. <title>FlexPaper</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <style type="text/css" media="screen">
  7. html, body { height:100%; }
  8. body { margin:0; padding:0; overflow:auto; }
  9. #flashContent { display:none; }
  10. </style>
  11. <script type="text/javascript" src="js/flexpaper_flash.js"></script>
  12. </head>
  13. <body>
  14. <div style="position:absolute;left:10px;top:10px;">
  15. <a id="viewerPlaceHolder" style="width:660px;height:480px;display:block"></a>
  16. <script type="text/javascript">
  17. var fp = new FlexPaperViewer(
  18. 'FlexPaperViewer',
  19. 'viewerPlaceHolder', { config : {
  20. SwfFile : escape('Paper.swf'),
  21. Scale : 0.6,
  22. ZoomTransition : 'easeOut',
  23. ZoomTime : 0.5,
  24. ZoomInterval : 0.2,
  25. FitPageOnLoad : true,
  26. FitWidthOnLoad : false,
  27. PrintEnabled : true,
  28. FullScreenAsMaxWindow : false,
  29. ProgressiveLoading : false,
  30. MinZoomSize : 0.2,
  31. MaxZoomSize : 5,
  32. SearchMatchAll : false,
  33. InitViewMode : 'Portrait',
  34. ViewModeToolsVisible : true,
  35. ZoomToolsVisible : true,
  36. NavToolsVisible : true,
  37. CursorToolsVisible : true,
  38. SearchToolsVisible : true,
  39. localeChain: 'en_US'
  40. }});
  41. </script>
  42. </div>
  43. <!-- THE FOLLOWING CODE BLOCK CAN SAFELY BE REMOVED, IT IS ONLY PLACED HERE TO HELP YOU GET STARTED. -->
  44. <div style="position:absolute;left:680px;height:540px;top:10px;font-family:Verdana;font-size:9pt;background-color:#CACACA;width:300px">
  45. <div style="padding: 5px 5px 5px 5px;font-size:15px;font-weight:bold;text-align:center;margin-top:10px;">FlexPaper Sample Document</div>
  46. <div style="padding: 5px 5px 5px 5px;font-size:11px;text-align:left;margin-bottom:10px;">Can't see the document and running FlexPaper from your local directory?<br/><br/> Upload the contents of the zip file to a web server or make FlexPaper trusted to run locally. You can manage your trusted flash applications at <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.html#119065">Adobe's website</a>.</div>
  47. <div style="background-color:#EFEFEF">
  48. <div style="padding: 5px 5px 5px 5px;font-size:15px;font-weight:bold;text-align:center;margin-top:50px;">More Examples</div>
  49. <div style="padding: 5px 5px 5px 5px;font-size:11px;text-align:left;margin-bottom:10px;line-height:150%">
  50. » <a href="examples/two_page.html">FlexPaper starting up in Two-Page mode</a><br/>
  51. » <a href="examples/interactive_API.html">Interactive API html page</a><br/>
  52. » <a href="examples/searchmatchall.html">Search and highlight all matches</a><br/>
  53. </div>
  54. <div style="padding: 5px 5px 5px 5px;font-size:15px;font-weight:bold;text-align:center;margin-top:50px;">Publishing with PHP</div>
  55. <div style="padding: 5px 5px 5px 5px;font-size:11px;text-align:left;margin-bottom:10px;line-height:150%">
  56. » <a href="php/simple_document.php">On the fly conversion (requires PHP5)</a><br/>
  57. » <a href="php/split_document.php">Split file conversion (requires PHP5)</a>
  58. </div>
  59. <div style="padding: 5px 5px 5px 5px;font-size:15px;font-weight:bold;text-align:center;margin-top:50px;">Documentation</div>
  60. <div style="padding: 5px 5px 5px 5px;font-size:11px;text-align:left;margin-bottom:10px;line-height:150%">
  61. » <a href="http://flexpaper.devaldi.com/docs_php.jsp">Configuring and Publishing with PHP</a><br/>
  62. » <a href="http://flexpaper.devaldi.com/docs_converting.jsp">Converting Documents</a><br/>
  63. » <a href="http://flexpaper.devaldi.com/docs_parameters.jsp">Parameters</a><br/>
  64. » <a href="http://flexpaper.devaldi.com/docs_api.jsp">API</a><br/>
  65. </div>
  66. </div>
  67. </div>
  68. </body>
  69. </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">	
    <head> 
        <title>FlexPaper</title>         
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
        <style type="text/css" media="screen"> 
			html, body	{ height:100%; }
			body { margin:0; padding:0; overflow:auto; }   
			#flashContent { display:none; }
        </style> 
		
		<script type="text/javascript" src="js/flexpaper_flash.js"></script>
    </head> 
    <body> 
    	<div style="position:absolute;left:10px;top:10px;">
	        <a id="viewerPlaceHolder" style="width:660px;height:480px;display:block"></a>
	        
	        <script type="text/javascript"> 
				var fp = new FlexPaperViewer(	
						 'FlexPaperViewer',
						 'viewerPlaceHolder', { config : {
						 SwfFile : escape('Paper.swf'),
						 Scale : 0.6, 
						 ZoomTransition : 'easeOut',
						 ZoomTime : 0.5,
						 ZoomInterval : 0.2,
						 FitPageOnLoad : true,
						 FitWidthOnLoad : false,
						 PrintEnabled : true,
						 FullScreenAsMaxWindow : false,
						 ProgressiveLoading : false,
						 MinZoomSize : 0.2,
						 MaxZoomSize : 5,
						 SearchMatchAll : false,
						 InitViewMode : 'Portrait',
						 
						 ViewModeToolsVisible : true,
						 ZoomToolsVisible : true,
						 NavToolsVisible : true,
						 CursorToolsVisible : true,
						 SearchToolsVisible : true,
  						
  						 localeChain: 'en_US'
						 }});
	        </script>
        </div>
        
		<!-- THE FOLLOWING CODE BLOCK CAN SAFELY BE REMOVED, IT IS ONLY PLACED HERE TO HELP YOU GET STARTED. -->
        <div style="position:absolute;left:680px;height:540px;top:10px;font-family:Verdana;font-size:9pt;background-color:#CACACA;width:300px">
			<div style="padding: 5px 5px 5px 5px;font-size:15px;font-weight:bold;text-align:center;margin-top:10px;">FlexPaper Sample Document</div>
			<div style="padding: 5px 5px 5px 5px;font-size:11px;text-align:left;margin-bottom:10px;">Can't see the document and running FlexPaper from your local directory?<br/><br/> Upload the contents of the zip file to a web server or make FlexPaper trusted to run locally. You can manage your trusted flash applications at <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.html#119065">Adobe's website</a>.</div>
			
			<div style="background-color:#EFEFEF">
				<div style="padding: 5px 5px 5px 5px;font-size:15px;font-weight:bold;text-align:center;margin-top:50px;">More Examples</div>
				<div style="padding: 5px 5px 5px 5px;font-size:11px;text-align:left;margin-bottom:10px;line-height:150%">
						» <a href="examples/two_page.html">FlexPaper starting up in Two-Page mode</a><br/>
						» <a href="examples/interactive_API.html">Interactive API html page</a><br/>
						» <a href="examples/searchmatchall.html">Search and highlight all matches</a><br/>
						</div>
						
				<div style="padding: 5px 5px 5px 5px;font-size:15px;font-weight:bold;text-align:center;margin-top:50px;">Publishing with PHP</div>
				<div style="padding: 5px 5px 5px 5px;font-size:11px;text-align:left;margin-bottom:10px;line-height:150%">
						» <a href="php/simple_document.php">On the fly conversion (requires PHP5)</a><br/>
						» <a href="php/split_document.php">Split file conversion (requires PHP5)</a>
				</div>
						
				<div style="padding: 5px 5px 5px 5px;font-size:15px;font-weight:bold;text-align:center;margin-top:50px;">Documentation</div>
				<div style="padding: 5px 5px 5px 5px;font-size:11px;text-align:left;margin-bottom:10px;line-height:150%">
						» <a href="http://flexpaper.devaldi.com/docs_php.jsp">Configuring and Publishing with PHP</a><br/>
						» <a href="http://flexpaper.devaldi.com/docs_converting.jsp">Converting Documents</a><br/>
						» <a href="http://flexpaper.devaldi.com/docs_parameters.jsp">Parameters</a><br/>
						» <a href="http://flexpaper.devaldi.com/docs_api.jsp">API</a><br/>
				</div>		
			</div>					
		</div>
   </body> 
</html> 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值