See https://bugzilla.mozilla.org/show_bug.cgi?id=1735738 for reference.
0,
                  textLayerCanvas.width,
                  textLayerCanvas.height
                );
                var enhanceText = !!task.enhance;
                
                initPromise = page
                  .getTextContent({
                    normalizeWhitespace: true,
                    includeMarkedContent: true,
                  })
                  .then(function (textContent) {
                    return rasterizeTextLayer(
                      textLayerContext,
                      viewport,
                      textContent,
                      enhanceText
                    );
                  });
              } else {
                textLayerCanvas = null;
                
                
                renderAnnotations = !!task.annotations;
                renderForms = !!task.forms;
                renderPrint = !!task.print;
                renderXfa = !!task.enableXfa;
                
                if (renderAnnotations || renderForms || renderXfa) {