|Here's a neat hack I made recently to do basic PDF editing directly in a browser—without having to upload anything to a server.|
I was initially looking for a way to do simple PDF modification (extracting pages, merging, and adding page numbers). There are some good server-side tools for this (QPDF, PDFTk, PDFBox, iText, Hummus), but for better speed and privacy I really wanted a 100% client-side solution.
Actually, I found out that Mozilla's pdf.js solved half the problem, as it does an excellent job disassembling PDF files. So all I had to do was figure out a way to put them back together again.
The result is PDF Assembler, now available on GitHub and NPM. I also put together a demonstration site (https://www.pdfcircus.com) which shows some examples of what it can do. I know PDF Assembler still needs some tweaking, but I think the basic idea is sound, and so far I've been pretty happy with how it works.
Please take a look and let me know what you think.
PDF Assembler Links:
Demonstration Site - https://www.pdfcircus.com
GitHub - https://github.com/DevelopingMagic/pdfassembler
NPM - https://www.npmjs.com/package/pdfassembler