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"

} else {
          affectedBoundary.x2New = maxXNew;
        }
      } else if (affectedBoundary.x2New > maxXNew) {
        
        affectedBoundary.x2New = Math.max(maxXNew, affectedBoundary.x2);
      }
    }
    
    const changedHorizon = [];
    let lastBoundary = null;
    for (q = i; q <= j; q++) {
      horizonPart = horizon[q];
      affectedBoundary = horizonPart.boundary;
      
      const useBoundary =
        affectedBoundary.x2 > boundary.x2 ? affectedBoundary : boundary;
      if (lastBoundary === useBoundary) {
        
        changedHorizon[changedHorizon.length - 1].end = horizonPart.end;
      } else {
        changedHorizon.push({
          start: horizonPart.start,
          end: horizonPart.end,
          boundary: useBoundary,
        });
        lastBoundary = useBoundary;
      }
    }
    if (horizon[i].start < boundary.y1) {