logoalt Hacker News

speereryesterday at 8:03 PM1 replyview on HN

Nice work. I've been building something lately to manipulate PDFs in the browser for privacy, although it's quite a different use case.

I think I see you're using pdf-lib and jspdf - both great libraries, and I'm using both, but:

(1) Have you seen the recent WASM compilation of MuPDF? I am also using it for some functions and find it really excellent with accessible APIs and highly functional. Worth an try!

(2) We chose different forks of the (unmaintained) pdf-lib - is there a reason you went with `pdf-lib-plus-encrypt`? I chose the cantoo fork, which seemed well-maintained to me - but I didn't research many others so would be interested to know if there is a good reason.


Replies

philjohnsonyesterday at 8:45 PM

(1) Yes, I am very familiar with the WASM compilation of MuPDF. It's got a lot of great features. I actually built another product pdfredactoronline.com that does redaction fully in the browser using the MuPDF WASM compilation. The reason I don't use it in BreezePDF is MuPDF has an APGL license which requires open-sourcing any code that uses their software. Which, I guess technically anything fully browser based is essentially open sourced :) so perhaps I could use it here.

Since a lot of the basic functionality I've added so far is also covered by more permissible packages like the ones you mentioned, I've started out just using those. But thanks for bringing that up, I'll revisit using MuPDF for redaction and other features

(2) I went with pdf-lib-plus-encrypt because the original pdf-lib doesn't have functionality for password-protecting PDFs, and since pdf-lib-plus-encrypt does, I used it so I could have that feature

show 3 replies