logoalt Hacker News

jimjimjimtoday at 9:55 AM1 replyview on HN

Question about merging: How do you handle merging multiple pdf that have forms? Are the form fields renamed to prevent form field name clashes?

And what pdf toolkit do you use?


Replies

pdfmergelytoday at 10:35 AM

Our merge is page-level, not form-aware. We copy the pages (including the visual appearance of form fields), but we don't merge the PDFs' AcroForm dictionaries.

As a result, form fields typically aren't fillable after merging, and field name conflicts aren't an issue, so we don't rename fields.

We use @cantoo/pdf-lib (a maintained fork of pdf-lib) running entirely client-side in a Web Worker, so all processing happens locally in the browser and no files leave the user's device.