docs: function PDFViewer_scrollPageIntoView(pageNumber,
                                                                dest) {
        if (!this.pdfDocument) {
          return;
        }
  
        if (this.isInPresentationMode || !dest) {
          this._setCurrentPageNumber(pageNumber);
          this._resetCurrentPageView();
          return;
        }
  
        var pageView = this._pages[pageNumber - 1];
        var x = 0, y = 0;
        var width = 0, height = 0, widthScale, heightScale;
        var changeOrientation = (pageView.rotation % 180 === 0 ? false : true);
        var pageWidth = (changeOrientation ? pageView.height : pageView.width) /
          pageView.scale / CSS_UNITS;
        var pageHeight = (changeOrientation ? pageView.width : pageView.height) /
          pageView.scale / CSS_UNITS;
        var scale = 0;
        switch (dest[1].name) {
          case 'XYZ':
            x = dest[2];
            y = dest[3];
            scale = dest[4];
            // If x and/or y coordinates are not supplied, default to
            // _top_ left of the page (not the obvious bottom left,
            // since aligning the bottom of the intended page with the
            // top of the window is rarely helpful).
            x = x !== null ? x : 0;
            y = y !== null ? y : pageHeight;
            break;
          case 'Fit':
          case 'FitB':
            scale = 'page-fit';
            break;
          case 'FitH':
          case 'FitBH':
            y = dest[2];
            scale = 'page-width';
            // According to the PDF spec, section 12.3.2.2, a `null` value in the
            // parameter should maintain the position relative to the new page.
            if (y === null && this._location) {
              x = this._location.left;
              y = this._location.top;
            }
            break;
          case 'FitV':
          case 'FitBV':
            x = dest[2];
            width = pageWidth;
            height = pageHeight;
            scale = 'page-height';
            break;
          case 'FitR':
            x = dest[2];
            y = dest[3];
            width = dest[4] - x;
            height = dest[5] - y;
            var hPadding = this.removePageBorders ? 0 : SCROLLBAR_PADDING;
            var vPadding = this.removePageBorders ? 0 : VERTICAL_PADDING;
  
            widthScale = (this.container.clientWidth - hPadding) /
              width / CSS_UNITS;
            heightScale = (this.container.clientHeight - vPadding) /
              height / CSS_UNITS;
            scale = Math.min(Math.abs(widthScale), Math.abs(heightScale));
            break;
          default:
            return;
        }
  
        if (scale && scale !== this._currentScale) {
          this.currentScaleValue = scale;
        } else if (this._currentScale === UNKNOWN_SCALE) {
          this.currentScaleValue = DEFAULT_SCALE_VALUE;
        }
  
        if (scale === 'page-fit' && !dest[4]) {
          scrollIntoView(pageView.div);
          return;
        }
  
        var boundingRect = [
          pageView.viewport.convertToViewportPoint(x, y),
          pageView.viewport.convertToViewportPoint(x + width, y + height)
        ];
        var left = Math.min(boundingRect[0][0], boundingRect[1][0]);
        var top = Math.min(boundingRect[0][1], boundingRect[1][1]);
  
        scrollIntoView(pageView.div, { left: left, top: top });
      }