Sumatra PDF is a PDF, ePub, MOBI, CHM, XPS, DjVu, CBZ, CBR reader for Windows

Always run Sumatra with "-invert-colors" active

I want Sumatra to run the command line, “-invert-colors,” every single time I open it. Modifying the shortcut isn’t sufficient, as, when I chose to open files using Sumatra, it runs without the command line. I would rather not deal with registry values. I would assume there would be a way to force this command line to run every time by modifying the advanced settings text tile, but I have not discovered this method.

Thank you.

1 Like

You can try flipping (or adjusting as per your needs) all the TextColor and BackgroundColor values in the settings file. Short of editing the registry to add -invert-colors to the default command line, this is the best you can do.

1 Like

Hello there,

Is there a way (advance settings or other) which will default start Sumatra with inverted colours?

I currently do it via the -invert-colors command-line argument. Works well.

But I would rather just double click on a PDF no matter which version of the shortcut is running.

Let me know your thoughts?

1 Like

It may be possible to mess with registry settings to force the inversion, however you don’t need to do that.

Personally I would stick with shortcuts as you have that invert on demand, for viewing negatives.
You can add them to SendTo or drop a folder of negatives on the icon etc.
What -invert-colors does was provide one short command amongst other several older depreciated ones such as -set-color-range #dddddd #333333 but in essence it replicates this

FixedPageUI [
	TextColor = #ffffff
	BackgroundColor = #000000

so setting those values means that you get the opposite effect when using -invert-colors thus should then make things “normal” !

You can get into smelborp when playing around with reversing colour ranges, I had to delete the settings file to prove it worked as you require, but the result same as -invert-colors is not good for everyday use in 3.2+ compared to 3.1.2.
image
hence my suggestion to use the shortcut as normal just when its needed.

I succesfully achieved to modify the command executed when you double-click a PDF file so that it runs with -invert-colors!

All you have to do is make sure Sumatra is the default PDF application, then run regedit.exe. Go to:
\HKEY_CURRENT_USER\SOFTWARE\Classes\SumatraPDF\shell\open\command
(if you want to apply this change only to your user account)

or

\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SumatraPDF\shell\open\command
(if you want to apply this change to all users)

Inside the command folder, there’s a key. Double-click it and you should see something like this:
“C:\Users<your user name>\AppData\Local\SumatraPDF\SumatraPDF.exe” “%1” %*

Insert -invert-colors without quotes between the path and the “%1”, and making sure there’s blank space on both sides, just like this
“C:\Users<your user name>\AppData\Local\SumatraPDF\SumatraPDF.exe” -invert-colors “%1” %*

And that’s it! It should work from now on. You may have to re-login to apply changes.

In latest pre-version just press i installed or portable
No need to add -invert-colors to the start command or mess with the registry

1 Like