加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-15 04:29:35 所属栏目:百科 来源:网络整理
导读:SwfFile (String) 需要使用Flexpaper打开的文档Scale (Number) 初始化缩放比例,参数值应该是大于零的整数ZoomTransition (String) Flexpaper中缩放样式,它使用和Tweener一样的样式,默认参数值为eaSEOut.其他可选值包括: easenone,eaSEOut,linear,eaSEOutq
SwfFile (String) 需要使用Flexpaper打开的文档

Scale (Number) 初始化缩放比例,参数值应该是大于零的整数

ZoomTransition (String) Flexpaper中缩放样式,它使用和Tweener一样的样式,默认参数值为eaSEOut.其他可选值包括: easenone,eaSEOut,linear,eaSEOutquad

ZoomTime (Number) 从一个缩放比例变为另外一个缩放比例需要花费的时间,该参数值应该为0或更大。

ZoomInterval (Number) 缩放比例之间间隔,默认值为0.1,该值为正数。

FitPageOnLoad (Boolean) 初始化得时候自适应页面,与使用工具栏上的适应页面按钮同样的效果。

FitWidthOnLoad (Boolean) 初始化的时候自适应页面宽度,与工具栏上的适应宽度按钮同样的效果。

localeChain (String) 设置地区(语言),目前支持以下语言。

    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)

    da_DN (Danish)

    cz_CS (Czech)

    it_IT (Italian)

    pl_PL (Polish)

    pv_FN (Finnish)

    hu_HU (Hungarian)

FullScreenAsMaxWindow (Boolean) 当设置为true的时候,单击全屏按钮会打开一个flexpaper最大化的新窗口而不是全屏,当由于flash播放器因为安全而禁止全屏,而使用flexpaper作为独立的flash播放器的时候设置为true是个优先选择。

ProgressiveLoading (Boolean) 当设置为true的时候,展示文档时不会加载完整个文档,而是逐步加载,但是需要将文档转化为9以上的flash版本(使用pdf2swf的时候使用-T 9 标签)。

MaxZoomSize (Number) 设置最大的缩放比例。

MinZoomSize (Number) 最小的缩放比例。

SearchMatchAll (Boolean) 设置为true的时候,单击搜索所有符合条件的地方高亮显示。

InitViewMode (String) 设置启动模式如"Portrait" or "TwoPage".

ViewModeToolsVisible (Boolean) 工具栏上是否显示样式选择框。

ZoomToolsVisible (Boolean) 工具栏上是否显示缩放工具。

NavToolsVisible (Boolean) 工具栏上是否显示导航工具。

CursorToolsVisible (Boolean) 工具栏上是否显示光标工具。

SearchToolsVisible (Boolean) 工具栏上是否显示搜索。

 

对比本例子中的参数设置:

SwfFile : escape('FusionCharts.swf'),//加载的SWF文件为FusionCharts.swf

Scale : 0.6,//初始化缩放比例为0.6,即60%

ZoomTransition : 'eaSEOut',ZoomTime : 0.5,ZoomInterval : 0.2,FitPageOnLoad : true,//加载时自动适应页面

FitWidthOnLoad : false,//加载时自动适应页面宽度

FullScreenAsMaxWindow : false,ProgressiveLoading : false,MinZoomSize : 0.2,//页面最小可缩小成20%

MaxZoomSize : 5,//页面最大可放大成500%

SearchMatchAll : false,InitViewMode : 'Portrait',PrintPaperAsBitmap : false,ViewModeToolsVisible : true,ZoomToolsVisible : true,NavToolsVisible : true,CursorToolsVisible : true,SearchToolsVisible : true,localeChain: 'en_US' //设置地区(语言)为en_US

 

上面带注解的参数为我们经常设置的参数,下面我们来简单演示一下几个参数改变的效果:

FitWidthOnLoad : false 改成true

 

 

MaxZoomSize : 5 改成1

 

 

localeChain: 'en_US'改成'zh_CN'

?

使用例子:

?

<!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',FitWidthOnLoad : false,PrintEnabled : true,FullScreenAsMaxWindow : false,MaxZoomSize : 5,SearchMatchAll : false,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> 

?

2013-02-05 增加高度设置

修改 flexpaper_flash.js文件 ,默认是100%

(function() {
??? ???
??? var IE = document.all,
??? ??? ?URL = 'http://www.adobe.com/go/getflashplayer',
??? ??? ?JQUERY = typeof jQuery == 'function',
??? ??? ?RE = /(d+)[^d]+(d+)[^d]*(d*)/,
??? ??? ?GLOBAL_OPTS = {
??? ??? ??? // very common opts
??? ??? ??? width: '110%',
??? ??? ??? height: '165%',??? ???
??? ??? ??? id: "_" + ("" + Math.random()).slice(9),
??? ??? ???
??? ??? ??? // flashembed defaults
??? ??? ??? allowfullscreen: true,
??? ??? ??? allowscriptaccess: 'always',
??? ??? ??? quality: 'high',???
??? ??? ???
??? ??? ??? // flashembed specific options
??? ??? ??? version: [3,0],
??? ??? ??? onFail: null,
??? ??? ??? expressInstall: null,
??? ??? ??? w3c: false,
??? ??? ??? cachebusting: false? ??? ??? ???? ??? ?
??? };

?



?

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

蕃薯耀 2013年2月1日 09:25:02 星期五

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读