Skip to content

Instantly share code, notes, and snippets.

@dungsaga
Last active July 25, 2024 07:45
Show Gist options
  • Save dungsaga/6be25a7029421846b7c4ab1b5dd8eda2 to your computer and use it in GitHub Desktop.
Save dungsaga/6be25a7029421846b7c4ab1b5dd8eda2 to your computer and use it in GitHub Desktop.
picoPDF disk usage is tiny. Let's compare some PDF readers.

I read the blog post Lessons learned from 15 years of SumatraPDF, an open source Windows app and appreciate the effort to make it the most lightweight PDF reader today.

But then I recall that it was much more smaller when it was announced. I found some old 32-bit versions in FileHorse: image image

The size of the installer increased from 1MB to 4MB to 6MB. The installed size would be around 2.2 or 2.5 times bigger.

I understand that SumatraPDF depends from libmupdf (which is 11MB in my 64-bit version) and libmupdf support many more file formats than Poppler. On top of that, SumatraPDF added support for many compressed archive formats and modern image formats.

I wonder if we can make it more lightweight like its previous versions by splitting some supports into DLL files that would be loaded dynamically. Would it be smaller if we use Poppler instead?

It's interesting to read the SumatraPDF version history, in version 0.9 : "removed poppler rendering engine resulting in smaller program and updated to latest mupdf sources". At that time, the installer was only 1 MB. The growth of mupdf contributes a lot to the size of SumatraPDF. Mupdf even added support for MOBI recently.

This is not a complain about SumatraPDF. I still love it and understand that today it comes with lots of functions and it's still smaller than other PDF readers (The little Foxit Reader is already bloated over 150 MB).

This is just a what-if kind of thought experiment I have when I look at the smallest PDF freemium editor : PicoPDF image image

This content was adapted from the discussion at Should SumatraPDF be more lightweight?


Let's compare some PDF readers. I look at portable verion of them to avoid the problem of some of them usually put files in many folders (outside of their installation folder).

compare-some-PDF-readers

FoxitReader has grown so bloated. It's no longer the lean PDF reader that it used to be. Now it's almost 500MB. That's more than double the size of PDF-XChange Editor.

Meanwhile, SumatraPDF is still among the leanest.

Please note that SumatraPDF portable contains both 64bit and 32bit versions of SumatraPDF. The 32bit version is just 13.6MB, and the 64bit version is 15.3MB.

sumatraPDF

PDF-XChange Viewer is also very lean, but its development as ended several years ago. Excluding the translation files, it's just a 32bit app roughly at the same size as SumatraPDF 32bit.

pdfXCviewer

picoPDF is a small & simple PDF editor.

  • It installed only 1 file to C:\Program Files (x86)\NCH Software\PicoPDF\picopdf.exe (2.7MB)
  • It also downloaded the updated installer to C:\Program Files (x86)\NCH Software\PicoPDF\picopdfsetup_v4.01.exe (1.3MB)

image

Yes, they put some files in %APPDATA%/Roaming but the additional size is less than 1MB. And the folder C:\ProgramData\NCH Software\PicoPDF is empty. image

The features of PicoPDF is quite basic, so I think that they can keep the total size to be ~3.6MB

When SumatraPDF 0.1 was release, it was only a bit more than 1MB.

UPDATED:

when using OCR feature for the first time, it downloads TesseractOCR to %APPDATA%/Roaming (almost 30MB). So the total size of additional components is 30.5MB

image image

But for normal editing, PicoPDF can even work without network connection.

UPDATED AGAIN:

I was wrong. PicoPDF downloads some files when I open a PDF file.

So, you still need internet connection when you open a PDF for the first time.

And it's weird that these components are not listed in http://www.nch.com.au/components/

It looks like these files are downloaded over HTTP, because I found http://www.nch.com.au/components/%s.exe in picopdf.exe. Other connections are made over HTTPS (checking for upgrade, registration, downloading new version...), such as https://www.nch.com.au/components/jp/picopdfsetupfree.exe, https://www.nchsoftware.com/picopdf/jp/picopdfsetupfree.exe

These components are registered under registry key HKEY_CURRENT_USER\SOFTWARE\NCH Software\Components image

Change log for released versions is at https://www.nchsoftware.com/picopdf/versions.html

Beta versions can be downloaded at https://www.nchsoftware.com/beta/index.html

This content was adapted from the discussion at Should SumatraPDF be more lightweight?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment