diff --git a/web/base_viewer.js b/web/base_viewer.js index affa751c4..f1932dc63 100644 --- a/web/base_viewer.js +++ b/web/base_viewer.js @@ -1173,7 +1173,7 @@ class BaseViewer { if (y === null && this._location) { x = this._location.left; y = this._location.top; - } else if (typeof y !== "number") { + } else if (typeof y !== "number" || y < 0) { // 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;