Every PDF Tool You Need, Running 100% in Your Browser
I got sick of PDF tools that require accounts, plaster watermarks on everything, or silently upload your files to some server in who-knows-where. So I built a full suite of PDF tools that run entir...

Source: DEV Community
I got sick of PDF tools that require accounts, plaster watermarks on everything, or silently upload your files to some server in who-knows-where. So I built a full suite of PDF tools that run entirely client-side. No uploads. No accounts. No watermarks. Your files never leave your browser tab. Here's what's in the toolkit and how each one works. Merge PDFs The most common thing people need. Drop in multiple PDFs, reorder them if you want, hit merge, get one file back. Under the hood this uses pdf-lib to copy pages from each source document into a new one: import { PDFDocument } from 'pdf-lib'; async function mergePDFs(files) { const merged = await PDFDocument.create(); for (const file of files) { const bytes = await file.arrayBuffer(); const doc = await PDFDocument.load(bytes); const pages = await merged.copyPages(doc, doc.getPageIndices()); pages.forEach(page => merged.addPage(page)); } return await merged.save(); } The copyPages method is the key — it brings over not just the page