From b61260ccb9bed192c57d864ace6291383ef109d6 Mon Sep 17 00:00:00 2001 From: Zourlo <7470935+Zourlo@users.noreply.github.com> Date: Wed, 15 Mar 2023 16:27:58 +0900 Subject: [PATCH] Update src/plugins/pdfPlayer/plugin.js change the default value for scale. Co-authored-by: Bill Thornton --- src/plugins/pdfPlayer/plugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/pdfPlayer/plugin.js b/src/plugins/pdfPlayer/plugin.js index 9fab3b3e9..d306b0d42 100644 --- a/src/plugins/pdfPlayer/plugin.js +++ b/src/plugins/pdfPlayer/plugin.js @@ -281,7 +281,8 @@ export class PdfPlayer { this.book.getPage(number).then(page => { const width = dom.getWindowSize().innerWidth; const height = dom.getWindowSize().innerHeight; - const viewport = page.getViewport({ scale: 5 }); + const scale = Math.ceil(window.devicePixelRatio || 1); + const viewport = page.getViewport({ scale }); const context = canvas.getContext('2d'); canvas.width = viewport.width; canvas.height = viewport.height;