From a7aee1d3d48763abbb3e0b352e142016bcbf7c4e Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 11 Feb 2022 12:33:28 +0100 Subject: [PATCH] Let the pdfjs deal with new render request --- api/js/etemplate/CustomHtmlElements/pdf-player.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/api/js/etemplate/CustomHtmlElements/pdf-player.ts b/api/js/etemplate/CustomHtmlElements/pdf-player.ts index dac1ab4e91..9db9effa97 100644 --- a/api/js/etemplate/CustomHtmlElements/pdf-player.ts +++ b/api/js/etemplate/CustomHtmlElements/pdf-player.ts @@ -187,14 +187,11 @@ class pdf_player extends HTMLElement { let viewport = page.getViewport({scale:self.__pdfViewState.zoom}); self._canvas.width = viewport.width; self._canvas.height = viewport.height; - // don't ty to render if page is under proccess - if (typeof page.intentStates.display == 'undefined') - { - page.render({ - canvasContext: canvasContext, - viewport: viewport - }); - } + + page.render({ + canvasContext: canvasContext, + viewport: viewport + }); }); }