当前位置: 代码迷 >> Java Web开发 >> 急求关于在线pdf预览的有关问题!
  详细解决方案

急求关于在线pdf预览的有关问题!

热度:2693   发布时间:2016-04-10 22:37:07.0
急求关于在线pdf预览的问题!!!在线等
最近需要做在线预览的功能,在网上找了个例子,能运行也能展示,加到自己的框架后,也可以转化到pdf,和swf文件,但是展示的时候报“FlexPaperViewer”未定义,各位大侠知道是哪的问题吗?
<%@ page language="java" contentType="text/html; charset=UTF-8"  
    pageEncoding="UTF-8"%>  
<%  
    String swfFilePath=request.getAttribute("swfpath").toString(); 
%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
<script type="text/javascript" src="js/jquery.js"></script>  
<script type="text/javascript" src="js/flexpaper_flash.js"></script>  
<script type="text/javascript" src="js/flexpaper_flash_debug.js"></script>  
<style type="text/css" media="screen">   
            html, body  { height:100%; }  
            body { margin:0; padding:0; overflow:auto; }     
            #flashContent { display:none; }  
        </style>   
  
<title>文档在线预览系统</title>  
</head
<body>   
        <div style="position:absolute;left:50px;top:10px;">  
            <a id="viewerPlaceHolder" style="width:820px;height:650px;display:block"></a>  
              
            <script type="text/javascript">   
                var fp = new FlexPaperViewer(     
                         'FlexPaperViewer',  
                         'viewerPlaceHolder', { config : {  
                         SwfFile : escape('<%=swfFilePath%>'),  
                         Scale : 0.6,   
                         ZoomTransition : 'easeOut',  
                         ZoomTime : 0.5,  
                         ZoomInterval : 0.2,  
                         FitPageOnLoad : true,  
                         FitWidthOnLoad : false,  
                         FullScreenAsMaxWindow : false,  
                         ProgressiveLoading : false,  
                         MinZoomSize : 0.2,  
                         MaxZoomSize : 5,  
                         SearchMatchAll : false,  
                         InitViewMode : 'SinglePage',  
                           
                         ViewModeToolsVisible : true,  
                         ZoomToolsVisible : true,  
  相关解决方案