setDocument(pdfDocument) {
    if (this._pdfDocument) {
      this.#reset();
    }
    if (!pdfDocument) {
      return;
    }
    this._pdfDocument = pdfDocument;
    this._firstPageCapability.resolve();
  }
Set a reference to the PDF document in order to search it.
Note that searching is not possible if this method is not called.

@param {PDFDocumentProxy} pdfDocument - The PDF document to search.