Edit existing PDF file in browser

Is there any JavaScript library that allows me to modify the PDF file on the client side (I mean directly in the web browser)? I would like to add a QR code to the PDF, which the user places in the browser but does not send to the server.

I found https://github.com/galkahana/HummusJS , but it looks like it only works on the server side in Node.js.

My temporary solution is to read and render PDF in Canvas with https://github.com/mozilla/pdf.js. After that, I just show the QR code and save / render in the PDF document through https://github.com/MrRio/jsPDF.

This solution has drawbacks because it simply prints the image in PDF format. I need to keep the original PDF format and just add this QR code to some page in it.

Any suggestions would help. Thank.

+4
source share

Source: https://habr.com/ru/post/1673224/


All Articles