Update src/plugins/pdfPlayer/plugin.js
change the default value for scale. Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user