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>

你可能感兴趣的:(Java,Web)