You can't use PDF.js to edit a PDF in the browser. It only renders a PDF to display it.
You're going to have to use a different library to edit PDF's client-side. Since you're trying to add editing capability, the library you use will be much, much larger than PDF.js and you'll end up have to ship over a ton of assets to the client to get the editor up and running.
Something like
PDFNet.js[
^] might work for you, but you're the only one who can answer that question.