首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >flexpaper默认两页视图设置

flexpaper默认两页视图设置
EN

Stack Overflow用户
提问于 2011-03-24 17:29:47
回答 2查看 1.7K关注 0票数 3

我使用flexpage和pdf2swf为我的pdf文件生成swf,并将其显示在我的页面中。

下面是我使用的设置

代码语言:javascript
复制
<script type="text/javascript">
   highlightPageMenuLink();
  var swfVersionStr = "10.0.0";  // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. 
    var xiSwfUrlStr = "playerProductInstall.swf"; // To use express install, set to playerProductInstall.swf, otherwise the empty string.  
    var flashvars = { 
      SwfFile : escape("<%= current_user.books.first.name%>.swf"),
        Scale : 0.6, 
        ZoomTransition : "easeOut",
        ZoomTime : 0.5,
      ZoomInterval : 0.1,
      FitPageOnLoad : false,
      FitWidthOnLoad : true,
      PrintEnabled : false,
      FullScreenAsMaxWindow : false,
      ProgressiveLoading : true,
      PrintToolsVisible : false,
      ViewModeToolsVisible : true,
      ZoomToolsVisible : true,
      FullScreenVisible : true,
      NavToolsVisible : true,
      CursorToolsVisible : true,
      SearchToolsVisible : false,
      localeChain: "en_US"
    };

    var params = {}
    params.quality = "high";
    params.bgcolor = "#ffffff";
    params.allowscriptaccess = "sameDomain";
    params.allowfullscreen = "true";
    var attributes = {};
    attributes.id = "FlexPaperViewer";
    attributes.name = "FlexPaperViewer";
    swfobject.embedSWF("FlexPaperViewer.swf", "flashContent", "650", "605", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes);
    swfobject.createCSS("#flashContent", "display:block;text-align:left;");
</script>

ViewModeToolsVisible设置为true,这样我就可以看到在单页模式、双页模式和缩略模式下查看页面的选项。如何使两页浏览模式成为我的默认模式?

谢谢。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2011-03-25 12:27:53

默认情况下可以显示两页视图。我们可以只在flexpaper_flash.js中插入一个调用

代码语言:javascript
复制
function onDocumentLoaded(totalPages){
getDocViewer().switchMode('TwoPage');}

但是我遇到了一个问题,它首先在单页模式下加载,然后将视图转换为两页模式。然后我不得不改变

ProgressiveLoading : true

ProgressiveLoading :错误的

票数 4
EN

Stack Overflow用户

发布于 2013-05-27 10:27:25

您可以只使用以下设置

InitViewMode (String)设置启动视图模式。例如“肖像”或"TwoPage“。

例如:

代码语言:javascript
复制
InitViewMode : 'TwoPage',

更多信息:http://flexpaper.devaldi.com/docs_parameters.jsp

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5417092

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档