PDF file:
https://drive.google.com/open?id=1ne84gRIMnss30UeXA475A84AY5pmYJyY

The text layer is rendered with extra spaces between each letter, for example:

Correct text: "VELKOMMEN TIL ALMINDINGEN"
Rendered text: "V E L K O M M E N   T I L   A L M I N D I N G E N"

let totalPages = matchesPerPage.length;
    for (let i = totalPages - 1; i >= 0; i--) {
      if (matchesPerPage[i] > 0) {
        totalPages = i + 1;
        break;
      }
    }
    const totalMatches = matchesPerPage.reduce((a, b) => {
      return a + b;
    });
    eventBus.on(
      "updatefindmatchescount",
      function onUpdateFindMatchesCount(evt) {
        if (pdfFindController.pageMatches.length !== totalPages) {
          return;
        }
        eventBus.off("updatefindmatchescount", onUpdateFindMatchesCount);
        expect(evt.matchesCount.total).toBe(totalMatches);
        for (let i = 0; i < totalPages; i++) {
          expect(pdfFindController.pageMatches[i].length).toEqual(
            matchesPerPage[i]
          );
        }
        expect(pdfFindController.selected.pageIdx).toEqual(
          selectedMatch.pageIndex
        );
        expect(pdfFindController.selected.matchIdx).toEqual(
          selectedMatch.matchIndex