From 087f96367936f33743a304b3446b24074290c367 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Thu, 26 Sep 2019 18:47:35 -0400 Subject: fix to native pdf sizes to avoid dealing with CSS_UNITS in pdf_viewer --- src/client/views/nodes/PDFBox.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index cf56925ea..5ac463b32 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -55,10 +55,10 @@ export class PDFBox extends DocComponent(PdfDocumen this.dataDoc.numPages = np; if (!this.Document.nativeWidth || !this.Document.nativeHeight || !this.Document.scrollHeight) { let oldaspect = (this.Document.nativeHeight || 0) / (this.Document.nativeWidth || 1); - this.Document.nativeWidth = nw; - this.Document.nativeHeight = this.Document.nativeHeight ? nw * oldaspect : nh; - this.Document.height = this.Document[WidthSym]() * (nh / nw); + this.Document.nativeWidth = nw * 96 / 72; + this.Document.nativeHeight = this.Document.nativeHeight ? nw * 96 / 72 * oldaspect : nh * 96 / 72; } + this.Document.height = this.Document[WidthSym]() * (nh / nw); } public search(string: string, fwd: boolean) { this._pdfViewer && this._pdfViewer.search(string, fwd); } -- cgit v1.2.3-70-g09d2