I really missed it when I made the switch to Linux, but not enough to consider installing WINE. Still, absolutely wonderful project deserving of the highest praise.
My PDF journey went from Adobe to Foxit to Firefox to SumatraPDF to Okular.
I chose Okular over SumatraPDF because it does form fills and saves said form fill data to a new PDF. (Sumatra may do form fills now, IDK)
I never would have tried Ocular if I wasn't on Fedora KDE, Sumatra was good enough, and I just fell back to FF when I had to do form fills (then print via CutePDF).
Now that Okular is just a 'choco install okular' away from having it on Windows as well as Linux, I get application consistency, form-fills that save modified PDF files, and annotation stuff.
But for Grandma? SumatraPDF it is.
I'm pretty sure Windows had a message loop since the very first version.
(Disclaimer: I am the developer of sioyek)
Well now you got me curious. Why is that?
Bought a license years ago but still use it daily.
As for pdfs and stuff, zathura, Okular, Calibre, or whatever ships with the distro are usually fine.
I also like to use fzf a lot, which is an amazing search utility (not only for finding files) for the terminal.
"ideology doesn't matter as much as doing" being said the syntax valid semantic invalid error at the end of this excerpt in the section on extensive tests being overrated gave me a chuckle:
> Dogma is powerful. Sometimes in my corporate life I felt like writing tests was just going through motion. Maybe we should spend more time writing code instead, I though?
In all seriousness I agree though. In a project where you write the majority of the code it is possible to overdo tests in a way that you are wasting more time than you're saving yourself and in a passion project efficiency isn't always as important as interest anyways.
It's as simple as it gets (with a UI), it's fast, robust and reliable. I wish governments would set aside some generous budgets for this type of projects that are consistently useful and reliable, like they do for arts and education (well, some governments).
It's one the first programs I install on every new system and have recommended it to friends for years.
If any of the programmers involved read here: Thank you very much for all the hard work. It was worth it.
but I am adobe hater, didn't use their software for decades, now I am using for years Foxit reader
Indeed, it's a "viewer" not an "editor" :)
Rolling your own JSON, XML, etc parsers raises some eyebrows. I guess it's sort of okay if you expect to only be reading your local config files versus arbitrary web content. Maybe then it's okay to trade off raw speed for not handing a ton of formatting and syntax edge cases.
Writing GUI apps against the native framework. Yup, it'll be a major pain to ever port to another platform. But if you don't care to do that, nothing's as fast and clean both to develop and for the end-user to use as every platform's native framework.
Unit tests are sometimes overrated. IMO, they're much more suited to building apps in dynamic languages. Unit tests are a lot less important if you have a good type system and compiler checking things already. I've heard it described before that half of the benefit of unit testing in these languages is forcing yourself to structure code in testable modules with clean interfaces. But if you can just do that anyways, the actual tests are less important.
But if you disagree, you should try a particular, very popular JSON library for C++ (removed the mention of the name here, you can figure it out on your own if you want).
Last I checked, a git clone of this library downloaded 260 Megabytes of data. The project consists of many many files, but most notably it is a C++ header-only library consisting of 24000 lines of header files to be included into every (transitively) dependent .cpp file.
When you run "g++ -E" on it (to do the preprocessing step only) those 24000 lines will unfold to about 84000 lines.
Just write a short test.cpp with #include <THIS JSON LIBRARY.h> in it and add a int main() { printf("Hello, world\n"); }. Compiling this with "g++ -c" takes about 1 sec on my laptop.
Add a tiny amount of code that "parses" the string literal "3" (which I think is not valid JSON actually. But anyway) and compile + link. Takes 2 secs on my laptop. With -O2, I'm at 3.5 seconds.
Imagine writing a larger project with many many .cpp file that include a header file that publishes such a dependency. Or just imagine compiling a project where multiple .cpp files directly include this thing.
It's a truly sad time to be a programmer.
Alright, looks like the self-brewed parser is explicitly for CHM HTML4 and EPUB XHTML only, with the more serious stuff in muPDF. I could still mess with it by self-packing CHM (HTML4 has optional tags for ergonomics too), but that sounds very boring.
That feels like a 180 after reading a couple thousand words extolling the virtues of small, fast code with minimal dependencies.
I look at the speed and efficiency of VSCode and it gives me hope that it's possible to write the high quality programs that we're used to from C/C++ using web technologies. It's just that right now we don't have enough good programmers creating good programs to incentivize the others to do better.
"I was able to incrementally convert program form using Poppler API to using Poppler via engine abstraction to using mupdf via Engine abstraction."
Make major changes incrementally.
These days I actually use Firefox as my Linux PDF reader.
- is fast AF
- supports SyncTeX
- doesn't unnecessarily lock the files it has open
For the most part that's perfect though. 99% of the time I just want to read a PDF so I just use the PDF reading tool not the PDF everything tool. That being said signing/form filling does bring me back to other solutions occasionally.
Does anyone know if the window background can be darkened at all? The window UI text color is controlled by the same setting as the pdf text color, so when using a dark background/light text mode the window UI text is very low contrast.
Not just that, but you can change the settings file while the reader is open and it will update immediately. I use a one-line cmd script to switch quickly between light and dark.
Thanks :)
I like people that know to say NO and produce obviously good thing on their own.
Silly, I know.
Despite getting free transfers (UK), I prefer middlemen.
I've had one transfer via Revolut, it was significantly more effort than I'd expected, but I'd do it again if explicitly asked for.
General security advice is to not share your bank details. I'd rather take the hit from PayPal fees or someone not donating rather than worrying about fraud. [0] for example.
Patreon (etc..) is recurring revenue, which builds confidence that what you're doing is sustainable long-term. When an OSS project opens for donations, it typically has an established userbase. The first "ask" will bring a comparatively large amount of money compared to the next "ask", and it raises the question of whether one-time donations will dwindle to zero. Recurring revenue hedges against that (and also allows more community building).
Banks and credit unions in the US usually have a bill pay system to send checks or e-checks for free. Some people do use it to contribute to projects, sometimes even as a recurring donation, but it's rare. I'm not sure it would be so cheap if it weren't rare.
Congrats on the good work!
Right now I'm paying $15 a month for primarily the privilege of editing PDFs. It seems every time I switch jobs, or have to send some documents, I need Adobe PDF writer.
Here's an example, can you not see the difference in sharpness clearly?
- Sumatra (grayscale): https://i.imgur.com/wOP8hdX.png
- Acrobat (subpixel): https://i.imgur.com/YXRy1WJ.png
(NOTE: Make sure you're viewing just the unscaled image by itself. You can download each and view it in a 1:1 pixel viewer to sure your browser isn't scaling it. Or run document.body.style.zoom = 1 / window.devicePixelRatio in Chrome.)
> Let's say I need to do a network request. I could include a monster library like curl or I could write 300 lines of code using win32 APIs. I wrote 300 lines of code.
huh, reminds me of tangent I have been in the same exact boat and did the same. Then something came up with SSL and just dragged in curl and doubled executable size. I think things are better these days in WinHTTP..
Come on, voices! Shout! "Worse is better" is the root of all evil. It's a virus, like C and Unix, and it is why most software is so miserable.
Feature bloat is another reason software is miserable.