Upgrade to latest mupdf and daily builds

This is an update about Sumatra development.

The core of PDF rendering is provided by mupdf library. We’ve been using a fairly old (3+ years) 1.6 version + our modifications.

I just finished updating to latest mupdf code. It was a fair amount of work because mupdf API changed.

It’s not ready for a release, because the rewrite is likely to have introduced bugs. On the upside, on average it should improve Sumatra’s PDF handling.

If you’re brave enough, you can use the latest code thanks to daily builds from https://www.sumatrapdfreader.org/dailybuilds.html

Daily builds are a new thing.

They are automatically generated after every change, so it’s the freshest code there can be. Also the most likely to be buggy.

This is in addition to existing pre-release builds at https://www.sumatrapdfreader.org/prerelease.html, which are like daily builds but updated less frequently.

You can see what changed in mupdf since 1.6 at https://mupdf.com/release_history.html

Bug reports, especially related to regressions since 3.1.2 are appreciated.

This will likely become a 3.2 release once I’m comfortable that there are no regressions.

4 Likes

I have tested previous off the press “artefacts” and usually they are stable, but I presume these are a more controlled daily release ?

1st comment By default offers to open text files GREAT,
however it cannot read them by default I have to CHANGE the old advanced setting
EbookUI [
UseFixedPageUI = true

I LOVE the side feature of highlighting a text file (as well as PDF & e-pub in text mode) so please (pretty please :slight_smile: don’t remove it but it may be worth explaining how it works by adding an .SMX file alongside the saved .TXT
Also may help to know if you get the crash reports automatically or do i need to describe how I crashed it by attempting something I should not have done :slight_smile:

P.S the first two links on the daily build page are confusing since one might expect the links to initiate the download however they perhaps rightly link to the general description about SumatraPDF ?

2nd difference observed
Previous versions up to pre-release 3.2.11133 were able to recognise comments and either allow a 5 second preview or right-click to “copy comment” for paste and review of longer texts.

Daily build 3.2.11269 (that was a very quick rollover at midnight ?)
does not have either feature.

Good point, I’ve improved those pages.

Could open individual issues for regressions, ideally with a repro document. There’s a lot of functionality in Sumatra and it might not be easy for me to find a file that has a particular feature, like comments. A detailed description would speed up bug fixing.

32bit daily builds seem to be compiled with more or less default compiler settings. They don’t run in Windows XP, because both VERSION and SUBSYSTEM options are set to 6.0 (Vista compatibility).

If you want to keep XP compatibility, installing xp toolset in MSVC is not enough. It sets only minimal SUBSYSTEM version, but keeps default unchanged. As the linker uses default settings, you must set proper /SUBSYSTEM manually.
See this discussion, please: https://stackoverflow.com/a/16088675

@kjk

Update to my comments above
recent versions do not have highlight working in PDF however it is working in Text files as observed yesterday

SumatraPDF-prerelease-11133-64 has 9MB but
SumatraPDF-prerelease-11300-64 has 33MB.

Why is there such difference ?

This was discussed as an “issue” on git hub for the answer see

Ah ok.
But I find Sumatra really special for having only 4MB to run.
Is there a way to reduce the size less or equal 10MB?

It is likely the final code will reduce by a percentage however without a total rewrite in assembly code (by the Ghost-script authors Artifex) the only option is to use a compressor/decompressor such as UPX (which I personally do not advocate as it can slow the program down and also likely repeatedly trigger antivirus warnings) For small size and speed the aim is to avoid unnecessary features such as flashy scrolling menus and as such SumatraPDF has always tried to avoid adding such bloatware. The problem of increased size is the increased need to allow for failings in the original concept of a simple PDF file format which Adobe keep adding “features” to.

Re: size increase.

The simple answer is all that comes from mupdf.

So why did mupdf increased in size so much?

It does more things and does it better.

Supports more file formats, supports more PDF features etc. PDF is a very complex format and earlier versions of mupdf were not handling every case that it handles now.

I’ll look into opportunites to reduce size but it’s unlikely I’ll find a way to significantly reduce the size.

In the end it makes no difference in practice. A 10 MB program loads instantly and 30 MB program loads instantly. A human can’t perceive the difference in launch speed. If Chrome (120 MB program) loads fast enough for you, then so will Sumatra, being 4x smaller.

While no-one likes useless bloated software even if they have large drives for installation, Sumatra’s never been one of those and IMO is unlikely to suddenly turn into one either (at least as long as you’re in charge! :slight_smile:).

I’m guessing that those using the portable versions on small (or nearly full) thumb drives are the ones who might be affected, rather than those installing the program.

Latest release is only 14MB.
Thank you @kjk !!!

What did you do ?

There was a short interuption to service :slight_smile: daily contents may not be as expected

@hover
The main reduction in size was removing some large (less generaly useful) fonts

1 Like

thanks you for the new version (11495).
the installer put the .exe in AppData\Local\SumatraPDF, not in C:\Program Files as expected
but it work well.
an other thing is the background color used behind an opened pdf is the same color used in MainWindowBackground option (witch is the legacy yellow sumatra), where another more neutral color is prefered.
thanks again for all these years of maintenance
please, excuse my not so fluently writing (i hope you understand the main sens)

@Roger_Grattery
Krzysztof (the only current developer) has been exceptionally busy adding hundreds of changes in thousands of lines of code, Almost every part has been updated.
There have been one or two minor hiccups recently with the installer locations but has now stabilised as you have noticed in the %localappdata%\SumatraPDF folder
There have been Many changes to color components and one effect is the restoration of the background color in several places such as bookmarks area, this included changes affecting main background and the default “Watchman Yellow” on occassion has returned :slight_smile:
It is easy to change, however pre-release and daily builds are still both “experimental” and any of these facets could vary in the formal release.

@Roger_Grattery
About your comment on background color
Current default for a new install should be “neutral” as setting should be
MainWindowBackground = #80fff200

thanks you for your kind reply