This is very confusing as seen in #12974 or #12906. My suggestion would be "legacy."
canvasAndContext.canvas.height = height;
  },
  destroy: function NodeCanvasFactory_destroy(canvasAndContext) {
    assert(canvasAndContext.canvas, "Canvas is not specified");
    
    
    canvasAndContext.canvas.width = 0;
    canvasAndContext.canvas.height = 0;
    canvasAndContext.canvas = null;
    canvasAndContext.context = null;
  },
};
var pdfjsLib = require("pdfjs-dist/es5/build/pdf.js");
var CMAP_URL = "../../../node_modules/pdfjs-dist/cmaps/";
var CMAP_PACKED = true;
var pdfPath =
  process.argv[2] || "../../../web/compressed.tracemonkey-pldi-09.pdf";
var data = new Uint8Array(fs.readFileSync(pdfPath));
var loadingTask = pdfjsLib.getDocument({
  data,
  cMapUrl: CMAP_URL,
  cMapPacked: CMAP_PACKED,
});
loadingTask.promise
  .then(function (pdfDocument) {
    console.log("# PDF document loaded.");
    
    pdfDocument.getPage(1).then(function (page) {
      
      var viewport = page.getViewport({ scale: 1.0 });