Forum moved here!

Home / Favorites for a PDF don’t work when that file is moved

jakemeer400

I recently created a favorites list for a book that catalogs and shortcuts all of its chapters and subsections due to the bookmarks not having any organization. When I moved this PDF into a new folder, however, upon opening up the file again the favorites list doesn’t work. Is this a problem with my system or just a general Sumatra problem? Is there a way to easily transfer over the favorites over to the “new” PDF or have Sumatra recognize the “new” PDF as a PDF that works with the organized favorites list. Thank you in advance.

GitHubRulesOK

Favourites is hardcoded to a folder&file in advanced settings, This has the advantage that if the file is on a drive that glitches it will be found when the folder returns, the disadvantage is as you note when a file is intentionally removed Favourites are not deleted (SumatraPDF does not know it was intentional)
IF you use SumatraPDF to rename the file then it should (later) rename the favorite location, that delay can catch you out :slight_smile:

FileStates [
	[
		FilePath = C:\MyData\portfolio.pdf
		Favorites [
			[
				Name = first
				PageNo = 1
			]

So if the file is moved outside of SumatraPDF from C:\MyData to C:\My Documents there is a problem unless you manually find and replace

Find FilePath = C:\MyData\ Replace with FilePath = C:\My Documents\

NOTE:- unlike some other commands with spaces we dont need to worry about Double " quotes, however a command line call to make such a change could have problems with the spaces. The bigger problem if you only moved some files to Documents but not others, Only you know what you changed.

So to answer your question use F3 to rename the file back to where it was and F3 again to rename to where you want it OR simpler put the correct new location into the old entry.

Note as always when you spend a lot of time making such customised lists you should always keep a backup since windows monthly updates or even a Sumatra Update going bad at the wrong time could reset the settings file without all those favorites.

jakemeer400

So, I’ve gone into “Advanced Options” and found the PDF that I moved to a different folder. What you’re telling me to do is take the past PDF location name/past File Path info and update it to the PDF’s new location, correct? That should then update the favorites to move over to the new location?

Also, to clarify, when you say keep a backup, are you referring to a backup of the Advanced Options or my PDFs? Thank you in advance.

kjk

I’ve fixed it after 3.3 release (Remember Document position only by filename and not by path. · Issue #14 · sumatrapdfreader/sumatrapdf · GitHub) so it should work in pre-release builds https://www.sumatrapdfreader.org/prerelease

GitHubRulesOK

When you change the old file path to the new location it should work for older settings.

But Note KJK has recently changed so path is not so important (NOW beware two files with same name but different favorites :slight_smile: )

Always Keep a backup of heavily customised (thus including your favorites and some other file history)
SumatraPDF-settings.txt (that’s the Advanced Options File)

jakemeer400

Hi, thank you this is great. Should I uninstall my current SumatraPDF before running this one?

GitHubRulesOK

Backup those settings :slight_smile:
It may not be necessary to uninstall that has also recently changed. but depends on where your old version was installed to.
I would suggest try out the pre-release portable first to see all the new benefits, and any wrinkles.

jakemeer400

Alright, sounds good! Thank you for the help.

jakemeer400
  1. I’m running the portable version right now. In order to transfer over all my PDF data over to the pre-release version, should I just copy-paste my old Advanced Options data into the pre-release Advanced Options?

  2. Is there a reason that the pre-release makes a folder called “sumatrapdfcache” with PNGs of the PDF covers?

kjk
  1. That should not be necessary. You can copy portable pre-release exe over your current portable exe and the settings should just work.
    But backup settings just in case.

  2. This is how Sumatra stores the thumbnails of documents you see on start page. Your current executable should be doing the same thing.

GitHubRulesOK

KJK is right you can copy new exe into same folder Names will be potentially different and they can share your old settings. but there is then potential for mix-ups so best until happy the new is better than old, just copy old settings with new exe to a new folder.

Your old setting probably had thumbnail generation off as a result of Options NOT remember opened files, which is why you would only have files with favorites “remembered”

jakemeer400

I realized my mistake in that I was not using the portable version for my old SumatraPDF, it was the actual full installer version. Thus the old data was in AppData “local” where I wouldn’t usually see it. I was just confused because the portable pre-release version created that cache folder in my Downloads page.

GitHubRulesOK

OK if old is in local its fairly recent 3.2 or 3.3 which you could update to 3.3.1 and generally see many improvements but pre-release (for 3.4) has the latest update for the filename issue you raised.

jakemeer400

I’d like to ask for clarification on transferring over favorite and PDF data. Should I just do it manually or is there another easier way?

GitHubRulesOK

If using SumatraPDF Portable just copy your old settings into same folder it will be updated to include Highlight colors, tooltips over tabs, etc.

If updating an installed copy ensure your old settings are backed up and new install should preserve and update the settings file. However, unless you install a pre-release it will not have the extras.

The only common problem is updating from older 3.1.2 to newer 3.2+ then old settings might be left in remote appdata whilst new settings are in local (and thus may need manual transfer) but I dont think that is your case?

jakemeer400

Yes, since I want to utilize the “remembering favorites” function for the pre-release build, judging by what you said in your comment it seems that I’ll have to do it manually.

GitHubRulesOK

Portable or installed it does not matter place your backup SumatraPDF-settings.txt file in the same or correct folder and first time SumatraPDF starts up after that it will upgrade any new settings thus it should keep your favorites.

jakemeer400

Should I delete the new settings.txt file when I place my backup file in, or can both of them be in there at the same time?

GitHubRulesOK

There can only be one file of that name in any folder so your old will overwrite the new if you say yes :slight_smile:

Just keep your backup copy of old in case there is any hiccup. If you ever delete the working settings SumatraPDF will always build a new one. (like a factory reset)

jakemeer400

Hi, I was able to bring in my backup settings into the folder smoothly and my favorites are now in the pre-release build. Thank you! One thing I noticed though is that every time I open Sumatra, it opens the popup asking if I want to set it as my default PDF reader. This continues to come up even though I’ve already set the program as my default in settings. Is this just a bug with the pre-release?