code: function TextLayerBuilder_render(timeout) {
        if (!this.divContentDone || this.renderingDone) {
          return;
        }
  
        if (this.textLayerRenderTask) {
          this.textLayerRenderTask.cancel();
          this.textLayerRenderTask = null;
        }
  
        this.textDivs = [];
        var textLayerFrag = document.createDocumentFragment();
        this.textLayerRenderTask = PDFJS.renderTextLayer({
          textContent: this.textContent,
          container: textLayerFrag,
          viewport: this.viewport,
          textDivs: this.textDivs,
          timeout: timeout
        });
        this.textLayerRenderTask.promise.then(function () {
          this.textLayerDiv.appendChild(textLayerFrag);
          this._finishRendering();
          this.updateMatches();
        }.bind(this), function (reason) {
          // canceled or failed to render text layer -- skipping errors
        });
      }
docs: Renders the text layer.
  @param {number} timeout (optional) if specified, the rendering waits
  for specified amount of ms.