convertToViewportRectangle(rect) {
    const topLeft = [rect[0], rect[1]];
    Util.applyTransform(topLeft, this.transform);
    const bottomRight = [rect[2], rect[3]];
    Util.applyTransform(bottomRight, this.transform);
    return [topLeft[0], topLeft[1], bottomRight[0], bottomRight[1]];
  }
Converts PDF rectangle to the viewport coordinates.
@param {Array} rect - The xMin, yMin, xMax and yMax coordinates.
@returns {Array} Array containing corresponding coordinates of the
  rectangle in the viewport coordinate space.
@see {@link convertToViewportPoint}