The test file at https://github.com/mozilla/pdf.js/blob/master/test/pdfs/annotation-choice-widget.pdf contains listboxes, which are not rendered correctly when printed right now. These kinds of fields are made by https://github.com/mozilla/pdf.js/blob/master/src/display/annotation_layer.js#L672-L678.

/cc @calixteman 
import { AnnotationStorage } from "./annotation_storage.js";
import { ColorConverters } from "../shared/scripting_utils.js";
import { XfaLayer } from "./xfa_layer.js";
const DEFAULT_TAB_INDEX = 1000;
const GetElementsByNameSet = new WeakSet();
function getRectDims(rect) {
  return {
    width: rect[2] - rect[0],
    height: rect[3] - rect[1],
  };
}
/**
 * @typedef {Object} AnnotationElementParameters
 * @property {Object} data
 * @property {HTMLDivElement} layer
 * @property {PDFPageProxy} page
 * @property {PageViewport} viewport
 * @property {IPDFLinkService} linkService
 * @property {IDownloadManager} downloadManager
 * @property {AnnotationStorage} [annotationStorage]
 * @property {string} [imageResourcesPath] - Path for image resources, mainly
 *   for annotation icons. Include trailing slash.
 * @property {boolean} renderForms
 * @property {Object} svgFactory
 * @property {boolean} [enableScripting]
 * @property {boolean} [hasJSActions]
 * @property {Object} [fieldObjects]
 * @property {Object} [mouseState]
 */
class AnnotationElementFactory {