News for hackers. Stuff that matters.
Re:Local PDF Tools – Powered by WebAssembly by svat on Wednesday March 03, 2021 @02:36AM (#26325719)
Last year I wrote a couple of similar "local" PDF tools that run in the browser with no network requests. Each is just a single HTML file that will work offline:

- https://shreevatsa.net/pdf-pages/ is for extracting pages, inserting blank pages, duplicating or reversing pages, etc.

- https://shreevatsa.net/pdf-unspread/ is for splitting a PDF's "wide" pages (consisting of two-page spreads) in the middle.

- https://shreevatsa.net/mobius-print/ is the earliest of these, and written for a niche use-case: "Möbius printing" of pages, which is printing out an article/paper two-sided in a really interesting order. (I've tried it and love it.)

These don't use WebAssembly, but just use the excellent "pdf-lib" JS library. To keep the file self-contained, I put the whole minified source into a <script> tag at the bottom of the (otherwise hand-written) HTML file.

Re:Local PDF Tools – Powered by WebAssembly by skrebbel on Wednesday March 03, 2021 @03:24AM (#26325976)
I hope to never again print more than 2 pages in a go in my life, but if I do, I'm definitely going to use your Möbius printing tool, it's genius.
Re:Local PDF Tools – Powered by WebAssembly by hackerbrother on Wednesday March 03, 2021 @10:01AM (#26329197)
Very cool!! Thanks for sharing :)
Re:Local PDF Tools – Powered by WebAssembly by justsayinghi on Wednesday March 03, 2021 @04:26PM (#26334799)
Very useful pdf tools