JavaScript Tool Merges PDFs Entirely in Browser Without Uploading Files
A developer has demonstrated how to merge PDF files directly in the browser using two JavaScript libraries, PDF.js and pdf-lib, eliminating the need for a server or file upload. The approach keeps all processing on the user's device, addressing privacy concerns associated with popular free PDF tools that silently upload documents to third-party servers. The method relies on reading files with FileReader, parsing and copying pages via pdf-lib, and triggering a local download of the merged output. The developer has packaged this functionality, along with split, compress, rotate, and other PDF tools, into a free open-source utility available on GitHub. Limitations include potential memory strain with very large files and possible fidelity loss for PDFs using uncommon fonts.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in