Skip to content

Commit

Permalink
Merge pull request #12339 from Snuffleupagus/bug-1663390
Browse files Browse the repository at this point in the history
Support broken /FitH destinations that are missing the "top" value (bug 1663390)
  • Loading branch information
timvandermeij authored Sep 7, 2020
2 parents 20c8915 + f78b348 commit ed47f77
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/base_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit ed47f77

Please sign in to comment.