Hacker News new | ask | show | jobs
by wonger_ 832 days ago
I'm facing that same pain point of programmatic PDF filling. I noodled around in the PDF format and learned it's a bit difficult to deal with fonts and formatting. But I think this client-side library works well enough, as a start: https://pdf-lib.js.org/#fill-form

I've also heard of one paid API that I forgot but seemed to work well, and this related service https://www.jotform.com/, and I also considered porting some server-side libraries to WASM. One day I'll collect all the libraries and findings in a blog post.

Are you looking to programmatically fill any PDF form by detecting the fields? Or are you filling one known PDF template?

1 comments

Years ago I needed to programmatically fill PDFs and used this library to achieve it. Funny it has the same name as what you linked: https://www.pdflib.com/

It is a paid commercial product however.