I Tried to Write a Decent Desktop App

Idea

The starting point for me was learning Go and writing a simple app, and I thought about operations on PDF files: merge, split, etc. pdf24 is one of the most popular apps for Windows, so I reviewed its functions and UI/UX as a baseline. The idea was to program 3% of the most useful functions. Does pdf24 do the job? Sure. Would I use it on Windows if I needed to transform PDFs? Yes, it’s just not worth looking for viruses. Linux has a number of desktop apps for PDF manipulation, by the way, but let’s just have another one. And I have some very specific ideas about UI/UX, but as I’m scratching my own itch here, it’s useful to write two sets of requirements: user requirements and dev requirements. You can check the GitHub page for the result with screenshots.

User requirements

Most users may not care about the size of the app or some aspects of UI/UX if it gets the job done. Still, there are some nice things to have:

Dev requirements

As a (lazy and novice) developer, I’d like to have the following:

Design choices

Regarding the language, Go ticks the boxes:

For the GUI toolkit, Tk9.0 ticks the boxes as well:

Regarding the UI/UX itself, I decided to have a menu with buttons, and for each operation to have three sections in one window:

So no pop-up messages, just one logically organized window, and Tk allows me to do it.

Statistics

I’m too lazy to measure how fast the app is; it actually uses the pdfcpu library, also written in Go. But it seems fast enough. :)

The only statistics I have are file sizes and lines of code. The pdf24 distribution is 600 MB, being a lot more functional and with fancy stuff like PDF previews. My app is 29 MB for Windows and 46 MB for Linux, which includes debugging info. Without debugging info, the Linux app is 36 MB, which can be further reduced with upx to 20 MB.

For the lines of code, it’s 1004 lines, which is relatively small.

For the learning experience, I rewrote parts of the app multiple times and learned to prioritize clarity and trust the compiler. For Tk, it’s better to look at examples for guidelines, but what’s important for me is that it’s stable and doesn’t bring new bugs. One could complain about the absence of HTML: you need to emulate it with the included markup language and generate tags, but it was fun.