News for hackers. Stuff that matters.
Re:Pdftool.org: modify pdfs offline in the browser by svat on Sunday August 13, 2023 @12:14PM (#37111267)
Big fan of offline tools like this. This one uses WebAssembly, but even that isn't necessary: I wrote a couple of PDF tools for my own use that simply use pdf-lib: https://shreevatsa.net/pdf-pages/ https://shreevatsa.net/pdf-unspread/
Re:Pdftool.org: modify pdfs offline in the browser by agumonkey on Sunday August 13, 2023 @12:24PM (#37111372)
super minimalist design, 100% function
Re:Pdftool.org: modify pdfs offline in the browser by Timon3 on Sunday August 13, 2023 @05:12PM (#37114549)
Me too! I try to build my web-based tools as single files to make downloading them easy. Usually this Vite plugin does the trick: https://www.npmjs.com/package/vite-plugin-singlefile
Re:Pdftool.org: modify pdfs offline in the browser by redman25 on Sunday August 13, 2023 @08:56PM (#37116251)
I created something similar for pdf diffing since I needed “visual” diffing instead of “textual” diffing. It uses Mozilla’s PDF.js library as the rendering engine. It’s amazing how much you can do in-browser. https://parepdf.com/
Re:Pdftool.org: modify pdfs offline in the browser by shurtler on Tuesday August 15, 2023 @05:48AM (#37131971)
Fantastic! Any tips on tools one can use to parse PDF including their structure? Much appreciated.
Re:Pdftool.org: modify pdfs offline in the browser by 4pkjai on Monday August 14, 2023 @12:49AM (#37117577)
Same! I’ve been meaning to make an offline HTML Cantonese dictionary with text to speech.
Re:Pdftool.org: modify pdfs offline in the browser by Tagbert on Monday August 14, 2023 @01:52AM (#37117905)
I created a tool to take project plans from a tool that we use to model schedules and generate gantt diagrams from the data in a way that is better than the commercial tool. It's all just a zip file containing an html file and a couple of javascript files. Others in our company are using it now as it is easier and produces better output than the modeling tool.

When I decided on a local html for the app, I wanted something that did not require installing a language like python, did not require installing, and would work on Windows and Mac.

Re:Pdftool.org: modify pdfs offline in the browser by hahn-kev on Monday August 14, 2023 @02:32AM (#37118122)
I also love the idea. However it's really hard to trust as a non IT person who understands that's possible and how to verify (via dev tools for example) that it's truly working offline.

I'm not really sure what the solution is, but I'd love to be able to navigate to a site like that and know that it's not uploading my files somewhere, without having to take your word for it.

Re:Pdftool.org: modify pdfs offline in the browser by svat on Monday August 14, 2023 @10:59AM (#37121812)
As far as I can see, it's the same as with any software: either you need good sandboxing, or you need to (read the source or) trust the developer. In-browser software at least has the advantage that it is well-sandboxed (you can be sure that the software isn't accessing arbitrary files on your disk other than the one you gave it access to, and cannot install a virus or whatever), and the tools needed for monitoring and disabling network access (dev tools) are built-in to the browser (don't have to separately install Little Snitch etc).

One mitigation against the risk of software "updates" (malicious code getting added later), if you trust or have verified one particular version of such a webpage, is to save the HTML file (put it in a Dropbox folder say) and open the file (maybe with network disabled), whenever you need to use it. But then you lose the advantage of "don't have to install anything"; it's a trade-off.