简介
pdf.js is a portable document format (pdf) viewer that is built with html5.
pdf.js is community-driven and supported by mozilla labs. our goal is to create a general-purpose, web standards-based platform for parsing and rendering pdfs.
开源地址:
下载后不能直接使用,需要重新构建,不熟悉将会非常麻烦
构建好的程序包:
示例
引用文件,直接复制下文可以直接使用
课程详情var var_filepath = decodeuricomponent("@filepath");//不能跨域
var var_win_height = $(window).height();
$(document).ready(function () {
resetplayersize();
});
$(window).resize(function () {
resetplayersize();
});
function resetplayersize() {
var_win_height = $(window).height();
$(".tmplayer").css({ "height": var_win_height + "px" });
}
$('.tmplayer').html('');
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持萬仟网。