diff --git a/web/base_viewer.js b/web/base_viewer.js index 4ed2ba4b0..9d7ac1d71 100644 --- a/web/base_viewer.js +++ b/web/base_viewer.js @@ -852,6 +852,10 @@ class BaseViewer { if (y === null && this._location) { x = this._location.left; y = this._location.top; + } else if (typeof y !== "number") { + // The "top" value isn't optional, according to the spec, however some + // bad PDF generators will pretend that it is (fixes bug 1663390). + y = pageHeight; } break; case "FitV":