---
title: "百度文库在线预览 源码"
author: "liaohanfeng"
date: "2015-04-24T10:04:19Z"
tags: ["Flash"]
categories: ["Web前端"]
slug: "untitled"
draft: true
lastmod: "2015-04-24T10:04:10Z"
id: 2205674
url: "https://liaohanfeng.iteye.com/blog/2205674"
---

利用openoffice转化文档成 pdf ，利用swftools 把pdf 转化成swf .最后用FlexPaperViewer显示swf。

var fileDir=document.getElementById("fileDir").value;
	    	var pageCount=document.getElementById("pageCount").value;
            $('#documentViewer').FlexPaperViewer(  
                    { config : {  
  						SWFFile:"{../"+fileDir+"[*,0].swf,"+pageCount+"}",
                        Scale : 1,  
                        ZoomTransition : 'easeOut',  
                        ZoomTime : 0.2,  
                        ZoomInterval : 0.2,  
                        FitPageOnLoad : false,  
                        FitWidthOnLoad : false,  
                       // FullScreenAsMaxWindow : false,  
                        ProgressiveLoading : false,  
                        MinZoomSize : 0.2,  
                        MaxZoomSize : 5,  
                        SearchMatchAll : false,  
                        InitViewMode : 'Portrait',  
                        RenderingOrder : 'flash',  
                        StartAtPage : '',  
  
                        ViewModeToolsVisible : true,  
                        ZoomToolsVisible : true,  
                        NavToolsVisible : true,  
                        CursorToolsVisible : true,  
                        SearchToolsVisible : true,  
                        WMode : 'window',  
                        localeChain: 'en_US'  
                    }}  
            );  