diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2019-09-26 18:47:35 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2019-09-26 18:47:35 -0400 |
| commit | 087f96367936f33743a304b3446b24074290c367 (patch) | |
| tree | e0faa1b5fbe9192a4599a4c4770424b33a6828f3 /src/client/views/nodes/PDFBox.tsx | |
| parent | 9ee90b29a63d7f83d5ad81283335f3a27443c049 (diff) | |
fix to native pdf sizes to avoid dealing with CSS_UNITS in pdf_viewer
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
| -rw-r--r-- | src/client/views/nodes/PDFBox.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
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<FieldViewProps, PdfDocument>(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); } |
