Show HN: Free, in-browser PDF editor
187 comments
·May 3, 2025throwanem
I tossed a legal document at it which was recently of passing interest to me, and it looks like embedded fonts still need some work. I'm not inclined to share a test case from what I have, which relates to a change of name and in any case was not really prepared by anyone especially competent when it comes to PDFs and their content; I tested with the first, facially void, version I was given. But it is possible I'll find more use for this tool, and if a shareable test case does come along then I'll do so. (And heaven knows with this document format, embedded fonts are a total nightmare always, even somehow in programmatic authoring. I'm not criticizing!)
On a similar note, a downloadable (single-file HTML or so, although these days some kind of HTTP service is a practical necessity) version would be nice to have. Low pri even from my perspective; it isn't that I spend a lot of time in places with no cell signal, so much as just that tethering on an a la carte plan gets out of hand pretty quick, since applications aren't at all required to honor or even notice the existence of the "data saver" option.
This is really neat! Thanks for posting it, I've bookmarked it for later use in the "just need a quick tweak" kind of case. I'll look forward to seeing how it develops!
wffurr
Fonts on the web are super hard. There’s hardly any useful browser APIs for the kind of typesetting you need for PDFs: itemization, character bounding boxes, font file sub setting, etc. To solve or properly, you need to include a lot of code, e.g. all of harfbuzz compiled to wasm.
throwanem
Well, that's the thing. Web fonts are hard. PDF fonts are super hard. Both at once is...actually maybe not hideous these days. Oh, I would not wish the task of devising such an algorithm, but the subset of vector fonts supported in PDF and that in browsers aren't totally disjoint, I think.
Modern processors can handle the relevant conversion math without really waking from sleep, which will no doubt make it more frustrating when some W3C third party resource security model WG fistfight from 2013 makes it impossible to both construct and use a webfont on the client. (There may be some hideous blob URL magic, but those are length constrained so you could up in N subset nonce fonts bucketing M custom glyphs from the source document, with a hideously complex fifty-case rewrite for all the p90 ways of mapping fonts in PDF (or is that 90 cases and p50?) to render the document in the editor. And then have to handle the actual editing cases, like what happens when your subset nonce font of a subset embedded font doesn't map any character to the keycode you just saw, and you want to try to give the user something with metrics sorta matching what they wanted instead of Helvetica or Times New Roman out of a naïvely constructed fontset.
I may have worked with PDF in browsers one time too many, before. But the idea of using WASM to smuggle real tools into this impoverished environment actually makes a lot of sense to me...
gus_massa
Emedded fonts only embed the used characters, so if ypu want to change "John" to "Mary" and there is no capital "M" elsewhere in the doccument, you are out of luck. Can this be your problem?
throwanem
The mapping is incorrectly decoded and applied such that many characters for which glyphs are embedded and applied do not show them. It's a pretty common style of PDF mojibake, I think, and sometimes appears also with badly subsetted webfonts or "icon font" abortions if you disable page fonts in your browser settings.
philjohnson
Thank you!
I'll take a look at improving rendering embedded font support. And that's a neat idea to be able to download it for offline, I'll give some thought to that. Appreciate your feedback!
KTibow
FYI - using service workers would automatically make it work offline and possibly be easier than trying to bundle it into one HTML file.
throwanem
Oh, that's an excellent point, especially since this is a perfect case for workers more broadly. I've had a bit of an app dev interregnum these last or postpandemic years; if service worker support has advanced that broadly, then that's wonderful news! Not especially surprising news, I suspect, but wonderful. Last I afforded close attention, the state of play for service workers in iOS Safari particularly was "don't bother."
Since I like an iPhone - or have thought at least they're least worst for 13 years and counting - you can probably imagine how this would have depressed my interest: Even though irrelevant here in that touchscreen PDF editing is an extremely hard problem and none I'd expect a solo dev to address, just knowing nothing I built with a worker I would myself be able to use, has made me not want to sink good time and effort into the topic at all. Best case that's all just wasted; worst case, it creates a dilemma I might not escape without a new regret.
dimava
You should make your app a PWA [1]
PWAs are basically "installable" pages which open in their own browser window and generally can work offline
[1] https://developer.mozilla.org/en-US/docs/Web/Progressive_web...
hakfoo
I love the idea of a downloadable version because I suspect there are a lot of business cases of
* Need to make a relatively narrow change to a PDF (add a line, reorder pages, concatenate two files)
* Adobe is $$$ and pretty much a subscription-only fiasco. Even the most trivial tasks are paywalled.
* Even if you're paying for Adobe at a corporate level, getting the IT clearance to get it installed might be more time sink than the actual task,
We have a server that had pdftk installed to generate some pre-filled documents and I ended up using that to concatenate two PDF files instead of fighting to get Real Acrobat.
speerer
Nice work. I've been building something lately to manipulate PDFs in the browser for privacy, although it's quite a different use case.
I think I see you're using pdf-lib and jspdf - both great libraries, and I'm using both, but:
(1) Have you seen the recent WASM compilation of MuPDF? I am also using it for some functions and find it really excellent with accessible APIs and highly functional. Worth an try!
(2) We chose different forks of the (unmaintained) pdf-lib - is there a reason you went with `pdf-lib-plus-encrypt`? I chose the cantoo fork, which seemed well-maintained to me - but I didn't research many others so would be interested to know if there is a good reason.
philjohnson
(1) Yes, I am very familiar with the WASM compilation of MuPDF. It's got a lot of great features. I actually built another product pdfredactoronline.com that does redaction fully in the browser using the MuPDF WASM compilation. The reason I don't use it in BreezePDF is MuPDF has an APGL license which requires open-sourcing any code that uses their software. Which, I guess technically anything fully browser based is essentially open sourced :) so perhaps I could use it here.
Since a lot of the basic functionality I've added so far is also covered by more permissible packages like the ones you mentioned, I've started out just using those. But thanks for bringing that up, I'll revisit using MuPDF for redaction and other features
(2) I went with pdf-lib-plus-encrypt because the original pdf-lib doesn't have functionality for password-protecting PDFs, and since pdf-lib-plus-encrypt does, I used it so I could have that feature
NoahZuniga
> Which, I guess technically anything fully browser based is essentially open sourced :) so perhaps I could use it here.
Open source isn't just about the source code being available (and when making web apps, there is often a compile step which makes the browser facing code not source code), but also about the license under which it is available.
It is in every sense of the word technically not open source.
hasbot
Weird that a google search for "pdf redact online" or "pdf redactor online" doesn't show your site in the first page.
philjohnson
Hopefully it will soon, the site is brand new :)
speerer
Thanks for the insight. Yes, the AGPL isn't a problem for me - I didn't check your licence as I could just view source :)
denfromufa
My wife hit a wall trying to upload a hefty PDF - every “shrink” tool we tried barely compressed the size, and some even made it larger! Frustrated by the state of PDF compressors (looking at you, Adobe), I turned to LLMs - Claude, Deepseek, and Gemini came up short, but OpenAI’s o4-mini saved the day with a perfect solution. That inspired me to build pdfmini: a tiny, open‑source, client‑side HTML app that crushes PDF sizes right in your browser!!! No installs, no fees, zero privacy worries - all your data stays on your machine.
Try pdfmini now:
https://den-run-ai.github.io/pdfmini/
Source code for pdfmini:
2Gkashmiri
This gave me an idea. You seem to be the right person to talk to.
Here is my workflow. Have a bunch of PDFs and images I need to combine.
I go to tools.PDF24.org, Merge pdfs, then compress them, then more compress them because of size limits, then add or remove pages. Then add page numbers.
These are multiple steps.
Could we have a way of defining these terms at start, either textual or no-code-like or something where we could define stuff like
Take input, merge > compress with greyscale, Max size 1MB, add page numbers on bottom right
Or
Convert input to jpg with image size 8cm by 8cm
I know many people who simply fail at such stuff. They just throw their hands up in defeat.
Not saying we should have llms do the job but if we could have multiple actions so that people could tell the software what they have in mind.
People dont just compress PDFs, often merge and then compress.
I recently say pdfux.com but it is not as featureful as PDF24 but PDF24 crashes a lot.
Beijinger
#!/bin/bash
# Convert images to PDF
img2pdf *.jpg -o images.pdf
# Merge PDFs
pdfunite file1.pdf file2.pdf images.pdf merged.pdf
# Compress
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook \ -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf merged.pdf
# Remove unwanted pages (e.g., page 3)
pdftk compressed.pdf cat 1-2 4-end output final.pdf
# Add page numbers
pdfjam final.pdf --outfile final_numbered.pdf --pagecommand '{}' --landscape
2Gkashmiri
You know what. I will share my script in the morning.
I used scantailor go scan a book. That gave out tif files.
So I built a script to convert them to jpg, then merge into PDF. Then OCR and add the text layer on PDF. Then compress.
I know this for a niche automation..... web OTOH where normies reside and are scared by terminal, it wont work.
Been using pdftk for years now but im only person who can use it in my office.
philjohnson
I'll be adding compression support for BreezePDF, so this can be done in a click
denfromufa
This is very cool, are all these command-line tools open-source?
denfromufa
If you can define this as a feature request to pdfmini, please submit it on github, e.g. drag-and-drop flow builder
maskros
Well so I glanced at what that project does.
Congratulations, you've managed to "compress" PDF files by rasterizing every page to JPEG, while destroying all the vector and textual information in it.
The resulting PDF is nothing like the input -- it's just a bunch of blurry JPEG images wrapped in a PDF format.
You can't search or copy the text, and trying to print it will just make a blurry mess of the text.
gaws
Nail it. I requested a 50% compression for a 200MB PDF file that contained pictures, and the tool made it an illegible mess. I can't imagine using this tool for anything serious, like tax returns, that requires a machine-readable file.
kevinlinxc
I use stirling-pdf for this, ran locally with
docker run -d -p 8080:8080 -e DOCKER_ENABLE_SECURITY=false --name stirling-pdf frooodle/s-pdf:latest
Lots of features, OP you should definitely check this out
theturtletalks
Stirling is a life saver, they have a web UI too: https://stirlingpdf.io
philjohnson
Seems cool! Thanks for sharing. Even though it's MIT licensed it's written in Java, so unfortunately I can't borrow any code, but it's nice for inspiration.
nicce
Official image seems to be "docker.stirlingpdf.com/stirlingtools/stirling-pdf:latest" BTW.
tbarbe
I created a similar offline tool during covid because I didn't want to upload sensitive data to random servers, it's open source if that can be useful to someone else : https://timothebarbe.github.io/pdfModer (Im not a front end dev, the UI is not very good)
nestorD
Nice! I will give it a try later today.
For people who want a non web-based alternative, these days I use Xournal++ (https://xournalpp.github.io/) to do that type of edition locally.
What I am still looking for is a good way to clean scanned PDFs: split double pages, clean up text and make sure it is in lack and white, clean deformations and margin, cut and maybe rotate pages, compress the end result.
fiddlerwoaroof
For splitting double pages, this is the best tool I’ve seen: https://github.com/mbaeuerle/Briss-2.0
For the other issues, I haven’t found any single good tool, but I’ve stitched together things like unpaper, ghostscript and deskew ( https://github.com/galfar/deskew ).
Also, if you need OCR, hocr-tools and Google’s Document AI ocr API have worked really well for me (I tried Gemini, but you run into issues with big documents).
kengoa
Great project! I'm also maintaining a fully in-browser data visualisation/analytics tool [1] and I often found it hard to convince people that their data isn't sent anywhere. It's funny I also say the exact same thing that they can inspect the Network tab. As a potential alternative to open-sourcing the codebase, maybe a desktop version of the same tool (i.e. an Electron app) could help address the privacy concerns if it explicitly states that it won't make network calls, although it's a perception problem rather than a technical one.
philjohnson
Thanks, and cool project you've built!
Yeah, you're right on that it's perception problem rather than tech. It's interesting because it's much less intuitive to inspect the code/network requests for a desktop app which on it's face seems less transparent than something on the web, but the kicker is that there is no URL that you're accessing it from so it feels safer.
I'm thinking now actually if I did a PWA? I think it has the psychological benefit of feeling of an offline desktop app (which it can function as), but is lightweight and less maintenance than an Electron app, while still having the benefit of automatically updating when I make improvements without needing to manually make updates.
Where I'm struggling on the open-source question is that in the PDF use case most of them are not developers and don't know what open source is let alone host it lol. And most businesses can probably afford to pay a nominal fee to host it themselves and modify it if they wish, which many companies offer. It would be different if the product was something like a database or code package where it's always going to be a developer using it.
While open source might actually have more "freedom" for people to modify it for free initially, in a way it can be more honest for a developer with any commercial intentions to not open source something while offering paid ways to modify the source code, as we're seeing more and more that companies start out with a very open source product that they then revert once the community has helped develop it. Not that it needs to happen that way, but with commercial aspirations one needs to be careful as something becomes popular, it becomes too tempting to take back once open-source parts.
Forgive the wall of text here, I'm thinking out loud haha. Appreciate your comment!
kengoa
I ended up making my app installable as a PWA based on this conversation myself. Changes were straightfoward to add on top of a Vite + React application: https://github.com/visprex/visprex/pull/62/files
kengoa
Yes as dimava commented above a PWA would be a great alternative.
> in a way it can be more honest for a developer with any commercial intentions to not open source something while offering paid ways to modify the source code
I appreciate that you made your commercial intentions clear in the comments and I agree that you don't want to walk back your license as it definitely leads to backlash. I think developers (i.e. people on HN) tend to trust open-core models more where there's a clear separation between the core open-source components and a paid offering but I guess you don't have to overindex on those given the general audience of this tool.
I don't know what your ultimate monetization goal is, but in my opinion one realistic path is an one-time only payment of some reasonable amount with the full feature as opposed to subscription (I saw your Stripe link in the source).
dimava
I'm 50% sure adding a "Install offline app" button that installs PWA would be enough to make them believe otherwise
Add a "Check for updates" button that redirects to chamgelog page in browser for extra points
philjohnson
This is a great idea. I was actually just suggesting PWA with opt-in updates in another comment I was just replying to, so it's affirming to hear someone else suggest it as well. Love the changelog piece.
Now the question is if people would be willing to pay. Perhaps it could be a nominal one-time payment to get the PWA and updates for up to a limited amount of time, or monthly amount to get updates indefinitely.
And maybe the URL accessed web version stays free with the core features, and PWA has benefits of both offline and some extra features.
Would you be willing to pay for something like this?
aziaziazi
Another alternative proposition to test data (non)upload is to ask your user to load the app, shut their device connection off and then use the app. The more cautious one will close the tab before switching the connection on.
cbracketdash
Scrolling is broken. Also for modals, it'd be nice to be able to click anywhere on the screen to close it (or pressing Esc) rather than just pressing "cancel".
Also for text, different fonts is a necessary requirement (and bolding, italics, underline, etc).
Also, it seems like I can't edit text boxes after creating them... I can't even tell if I've selected the text box (an outline would be nice).
Also the confirm modal for deleting a page is realllly annoying. You should just have it automatically delete the page and create an undo feature. (Basically store the original PDF, and store all the "actions" a user makes in an array, and then undo/redo the actions to the original pdf).
Also the arrow to close the page overview on the left side of the screen is very unintuitive. Why does the entire page shift to the left? The only reason I'd use that feature is to see my centered page more clearly. On this topic, a zoom feature is super important too.
Overall, the concept of a privacy-based PDF editor sounds really cool! Just note that for users to actually make a serious switch to this, you must at least match 1/4 of the quality of other PDF services like ilovepdf.com or smallpdf.com.
Good luck!
philjohnson
Scrolling is now fixed! And just updated so that if you click outside modal it closes. Working on update now so you can edit text you've already added.
Agree with you regarding fonts, bolding underlining etc. and having instant page deletion with undo/redo. Will definitely be adding soon.
Fixed the arrow closing the preview pane so that the page stays centered.
I plan on adding a lot more features so that it's on par with ilovepdf.com and smallpdf.com. The libraries I'm already using support many of the features they have, so it'll be easy to add them while keeping everything fully in the browser.
Thanks for the feedback!
cbracketdash
You're very welcome! Thanks for building this out! I look forward to using it :)
chfritz
Love the idea. However, there is no guarantee that the no-upload will not change. Which begs a question: wouldn't it be great if browsers provided a guaranteed "offline only" mode? Since they don't, I personally would prefer downloading this app as a standalone electron (or similar) app, or a docker container where I could disable Internet access.
ironmanszombie
It's a great idea indeed. But the paranoid _like myself?_ would probably not recommend it as it runs on...well...a browser. I'm not at ease with the chance that a code change someday would / could allow a copy of my file to be uploaded anywhere.
As for having the browsers run in "offline mode" (proxy equal 127.0.0 1?)...neat but I would vote against it. My fridge just needs to keep stuff cold, my toaster should serve bread, my Internet browser should not be an app.
philjohnson
Thanks!
The "offline only" app could be a PWA where you can access if if you're offline but I could even enforce disabling network requests in the code itself. Seems like the most straightforward solution to me. Could even make updates opt-in. Would keep it lightweight and easily accessible for anyone.
What do you think of this? Would you be willing to pay for this, or are certain features you'd be willing to pay for? Curious you're thoughts.
reyqn
You could use firefox containers to redirect a tab to localhost.
afranchuk
For what it's worth, Firefox has had most of these features built into their PDF.js viewer for a while. I believe signatures were recently added. I'm not sure whether there's capability to remove pages or merge PDFs, though.
rocketvole
pdf.js is also available as an extension on chromium based browsers.
I've found that scrolling on pdfs on a high dpi screen using the built in chromium pdf reader is extremely laggy so this has always been a must-have extension for me.
behnamoh
doesn't "edit" PDF text, just adds more.
wild_pointer
That's the problem with all the pdf editors available out there. I guess adding stuff is much easier than editing existing stuff which you didn't add, and can be laid out in a gazillion ways, because PDF is a format for viewing and printing, not for editing.
I had a period when I worked with lots of documents. I could only find one fairly decent PDF editor which deserves to be called that way. I could use it to open any PDF and delete an existing element, or change text in an existing field. Sometimes things behaved funny, for example a text field can have each letter in a separate block, but I assume the tool did what it could within reasonable effort. It worked fine for me overall.
hnick
PDF was basically created as a final presentation format, it's essentially append-only by design, which is why you hear so often of redactions just marking up a white/black box over text.
You can edit text streams, which needs a decompress/recompress, messes up all the object reference offsets for the entire file, potentially adds or removes characters to the subset font, which may not be referenced by the glyphs but a number instead to intentionally break copy/paste/scrape (e.g. 'a' is not 'a' in the text stream, but a random number), etc. Assuming the text is even marked up as strings, and not individually positioned characters with nested offset co-ordinate scaling to further muddy the waters.
The fact so many people want to edit PDFs probably indicates a design flaw on Adobe's side, when considering what customers really want.
jbarrow
Editing text in PDFs is _really_ hard compared to other document formats because most PDFs don't really encode the "physics" of the document. I.e. there isn't a notion of a "text block with word wrapping," it's more "glyphs inserted at location X with font Y."
If the PDF hasn't been made accessible, you have to do a lot of inferencing based on the layout about how things are grouped and how they should flow if you want to be able to make meaningful edits. Not impossible (Acrobat does it), but very challenging.
It's part of the legacy of PDF as a format for presentation and print jobs, rather than typesetting.
otsukare
Yes, and alongside formatting challenges, PDFs commonly only include the glyphs from the font that are actually used in the document.
So if you had PDF with "Hello World" on it, you could feasibly change it to "Hello Hello", but wouldn't be able to change it to "Goodbye World" (as the glyphs for "G", "b", "y", and "e" are not included in the PDF)
Sure, you could do a bit of detective work to figure out which font it was from the glyphs or something and lookup and insert new glyphs into the PDF, but I can't imagine a generic PDF editor being capable of doing this for you.
Some editors get around this but just straight up switching the font(s) for the whole PDF, so they'll look different after saving.
benatkin
It's still what a PDF editor, as it says in the title, would do. With a quick Google I found one that I hadn't heard about before, and it let me edit some text and save it for free.
2Gkashmiri
Sejda.com does it. Though its free one is severely crippled
layer8
PDF is really not a format designed for editing, of text content in particular. It’s only possible in limited circumstances.
philjohnson
yes, that's why the description says "add text" not edit :)
there aren't existing packages that can edit existing PDF text in the browser, but I'll do it myself sometime soon
kwanbix
The website says: Edit PDFs Freely & Privately, Right in Your Browser.
matsemann
What I miss in free alternatives is the ability to redact. Not just by placing a black bar above, but such that the text also leaves the PDF. Shouldn't even need to reflow other text as mentioned in another comment, as things would otherwise stay the same.
philjohnson
check out pdfredactoronline.com I also built that. I had to make it separate for now as it's using MuPDF JS library which has APGL licensing, but I might add it in here if it seems I can add it while still complying.
matsemann
Will check it out, thanks!
stefnotch
I noticed that this tool doesn't preserve links within PDFs. ( https://github.com/Hopding/pdf-lib/issues/341 ) That's one of the main things I always try out with PDF editors, and it saddens me to see that this one also runs into that issue.
Fixes would be either using a different PDF library, or manually implementing that feature with the building blocks that pdf-lib provides.
philjohnson
Not sure if you're referring to external or internal links but external ones are indeed preserved when once you download the modified PDF.
I've updated it so that external links are also clickable when viewing the PDF in the editor. Working on getting internal links to be clickable and function as well.
Let me know if this fits what you're after
Add text, input boxes, pictures, signatures, delete pages, merge PDFs and password protect them. All happening in the browser, 100% free and no sign-up.