PDF.js 检测文件是否加载完成

Smile to life whatever and whenever.

<script type="text/javascript">
    var interval = setInterval('loadPdf()', 1000);

    function loadPdf() {
        if (PDFViewerApplication.pdfDocument == null) {
            console.info('Loading...');
        } else {
            clearInterval(interval);
            console.info('Load Success...');
        }
    }
</script>

没有更多推荐了,返回首页