aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PDFBox.tsx
diff options
context:
space:
mode:
authorHannah Chow <hannah_chow@brown.edu>2019-03-11 23:50:04 -0400
committerHannah Chow <hannah_chow@brown.edu>2019-03-11 23:50:04 -0400
commit888dd6f51befd156b24a3c60d56d8e5823e621ad (patch)
treeb6082a04695306357c379c0dcbffd0241e18d649 /src/client/views/nodes/PDFBox.tsx
parente5c0eab1b3896cf28b6f54f5893d2998b70ef9af (diff)
parenta680579f74380eb016f0ffd61b3818d0850984b5 (diff)
origin merged
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r--src/client/views/nodes/PDFBox.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx
index 70a70c7c8..368a80b8e 100644
--- a/src/client/views/nodes/PDFBox.tsx
+++ b/src/client/views/nodes/PDFBox.tsx
@@ -423,7 +423,9 @@ export class PDFBox extends React.Component<FieldViewProps> {
// so this design is flawed.
var nativeWidth = this.props.doc.GetNumber(KeyStore.NativeWidth, 0);
if (!this.props.doc.GetNumber(KeyStore.NativeHeight, 0)) {
- this.props.doc.SetNumber(KeyStore.NativeHeight, nativeWidth * r.entry.height / r.entry.width);
+ var nativeHeight = nativeWidth * r.entry.height / r.entry.width;
+ this.props.doc.SetNumber(KeyStore.Height, nativeHeight / nativeWidth * this.props.doc.GetNumber(KeyStore.Width, 0));
+ this.props.doc.SetNumber(KeyStore.NativeHeight, nativeHeight);
}
if (!this.props.doc.GetT(KeyStore.Thumbnail, ImageField)) {
this.saveThumbnail();