Sumatra PDF: what is it and what is the story of an accidental success

When a software surpasses a decade of life and continues to boast an enviable user base, we can only speak of a great success. Sumatra PDF is a lightweight and fast PDF document viewer that offers several advantages over other similar software. Born in June 2006, he has almost reached “the age of majority” at the time of writing.

The author defines Sumatra PDF as a “accidental success“: would never have developed a PDF viewer for Windows if his bosses hadn’t asked him to make one for a device like Palm Foleo.

Sumatra PDF: the main features

Sumatra PDF is a very light program which is and will remain so, based on the path now taken by its developer. This makes it ideal for use on older computers and less powerful.

Designed to be fast, Sumatra PDF opens PDF documents very quickly: the application therefore becomes really useful for viewing large-scale documents. big dimensions. The simple and intuitive user interface makes the program easy to use for anyone, even novice users. In addition to PDFs, Sumatra supports eBook (ePub, Mobi)XPS, DjVu, CHM e Comic Book (CBZ e CBR).

How Sumatra was born PDF

Palm was a company specialized in the production of handheld computers that ceased all its activities in 2011: the creator of Sumatra PDF worked precisely for this company and he was called to create a PDF reader per Foleoa mini-laptop based on ARM architecture and Linux operating system. Foleo it never saw the light of day because the project was canceled a few weeks before the market launch for reasons that were never clarified.

Sumatra PDF developer Krzysztof Kowalczyk says that writing a library for rendering of PDF documents would have required a multi-year effort. Since he was the only one called to work on the project and he didn’t have years available, he decided to use the open source library Poppler. “PDF is a complex format and some documents are slow to render. I wanted to improve the speed because Jeff Bezos he told me that speed is something that customers always care about“, said the programmer.

Sumatra PDF born from a Poppler rib, thanks to profiler per Windows

Unfortunately, the inventor of Sumatra PDF did not have the right tools to develop on such a young ARM platform as the one chosen by Palm at the time. So he got the idea to use profiler per Windows, tools that help analyze the performance of a running program. The profiler monitors the program as it runs and records information such as the execution time of various parts of the code, function calls, memory allocations, and other data useful for understanding how the program is using the system resources.

I profiler they are very useful tools for developers who want optimize the performance of their software because they allow you to identify the parts of the code that require too much time or resources by identifying any memory or data access problems. Various vouchers already existed at the time profiler for Windows, including those built into some software development suite.

Using Poppler and by adding his library at compile time, the developer has also integrated a simple graphical interface resulting in a compact and functional PDF viewer for Windows.

In his long post Kowalczyk then talks about the many optimizations and improvements of the code that have made the software increasingly more efficient and also capable of managing heavy PDF documents and voluminous.

From the Palm platform to the debut on Windows

The initial idea, as we have seen, was to bring the work done to the Palm platform but in the end the creator of Sumatra PDF found himself in his hands with a winning project for the Windows environment. Its flagship? The fact that PDF viewer is also available in portable version which does not require installation and weighs just 15 MB. Really a trifle by today’s standards.

How can I keep SumatraPDF so small? I avoid useless abstractions. (…) I could use components like Qt, wxWindows or Gtk. They are easier to use but increase the size of the project giganticly“, explains Kowalczyk, who clarifies his approach to programming. “I’m not afraid to write my own implementation of things – I have for example my own JSON, HTML/XML parsers that are a fraction of the size of the most popular libraries for such tasks“.

Sumatra PDF is not just fast, it’s feature-rich

It’s not about “reinventing the wheel,” it’s about creatively leveraging the rich features included in Windows. “Let’s say I need to make 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“, Kowalczyk observes in his narration.

Let Sumatra PDF be simple e light it doesn’t mean that its functionality is reduced to the bare bones. The PDF viewer, for example, keeps track of all open documents over time to facilitate subsequent opening and processing; furthermore, with the key combination “secret” CTRL+K it is possible to access all the functions of Sumatra PDF through a single compact list.

The search box that Sumatra PDF offers also allows you to quickly identify and recall any function integrated into the program.

Sumatra PDF Reader 3.5 is the latest version and first public release of Sumatra since June 2022. One of the new features is support for dark theme: you can choose between two display options, both of which can be activated from the options window. A tap on the “i” key inverts the colors to adapt them to the background and text color of the PDF document being consulted.

The developer points out that the automatic adjustment of the colors doesn’t work well for images. Text-only PDFs, on the other hand, benefit from this as background and font colors are optimized for improve the reading experience.

Adobe Reader, one of the most popular programs for viewing PDF files, offers a number of options for open documents in specific ways. These options include the ability to specify the file path, file name, display options, and more within a single command string. Sumatra PDF embraces these commands and aligns with the behavior of Adobe Reader when opening any PDF document.

The open source PDF viewer is now capable of recognizing theimage orientation drawing on the EXIF ​​data contained in JPEG and PNG images. Furthermore, it offers support for opening and managing images in .AVIF format.

PDF documents can be dragged from the Sumatra window to an external location: this way the program displays the contents of the file in a new window. Tabs now support context menus.

There is also a new convenience shortcut with the mouse to use full-screen and presentation modes. Finally, annotations have three new viewing options that can be accessed through settings.

Sumatra PDF opens to ARM SoC based devices

In the article cited at the beginning, Kowalczyk wrote that Sumatra PDF would remain a PDF reader for Windows. The programmer had no intention of opening up to the multiplatform approach: “I don’t have the resources to write code for 3 platforms. Secondly, I believe that an excellent app for one platform can be more popular than a mediocre app for 3 different platforms“.

In reality, thanks to the ferment we are experiencing in the sector Windows on ARM, with several manufacturers promising the development of ARM SoCs aimed at the PC market, Kowalczyk has also published the version of his software intended for ARM64 systems. It can also be downloaded from the project download page.


Please enter your comment!
Please enter your name here