**Please do not work on this issue unless you have applied to the outreachy project.**

The [node/pdf2png/pdf2png.js](https://github.com/mozilla/pdf.js/blob/master/examples/node/pdf2png/pdf2png.js) example currently uses the older style of `promise.then` and callbacks. Convert it to use an `async` function and `await` style.

const canvasFactory = new NodeCanvasFactory();
      const canvasAndContext = canvasFactory.create(
        viewport.width,
        viewport.height
      );
      const renderContext = {
        canvasContext: canvasAndContext.context,
        viewport,
        canvasFactory,
      };
      const renderTask = page.render(renderContext);
      renderTask.promise.then(function () {
        
        const image = canvasAndContext.canvas.toBuffer();
        fs.writeFile("output.png", image, function (error) {
          if (error) {
            console.error("Error: " + error);
          } else {
            console.log(
              "Finished converting first page of PDF file to a PNG image."
            );
          }
        });
      });
    });
  })
  .catch(function (reason) {
    console.log(reason);
  });