页面引入 js
<script src="<%=request.getContextPath() %>/rapast/common/build_jb51/build/pdf.js"></script>
<script src="<%=request.getContextPath()%>/rapast/common/build_jb51/build/pdf.worker.js"></script>
页面代码
<div id="tmPlayer" class="tmPlayer" style="width: 100%; height: 100%"></div>
js代码
var var_filepath = decodeURIComponent(url);//不能跨域
$('.tmPlayer').html('<iframe frameBorder="0" scrolling="no" src="'+
var_filepath +
'" style="width:100%; height:100%;"></iframe>');
资源链接