How to know if PDF.JS has finished rendering?

后端 未结 12 1152
情深已故
情深已故 2020-12-13 14:44

I am using PDF.JS to render pdf pages into different canvas elements. my requirement is to capture the output of the canvas and to display it as an image. Is there some even

12条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-13 14:55

    window.addEventListener('load', function () {
        PDFViewerApplication.eventBus.on('textlayerrendered', function () {
          console.log('textlayerrendered', arguments, PDFViewerApplication)
        })
    

    Event name textlayerrendered includes of PDFViewerApplication.eventBus._listeners

提交回复
热议问题