sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.33k stars 1.69k forks source link

Support for reading groups #1843

Open zkosk opened 3 years ago

zkosk commented 3 years ago

When there are many opened books and status remember is enabled, it is very hard to find a book in the tab control. Commonly the many opened books can be grouped by category or purpose.

Currently the only way is to use multiple copy of the program, and multiple entries in start menu with the same icon.

Proposed feature:

  1. Select the current group (or create new empty group) from menu. When new group is selected, books of the old group are closed, and books of the new group are loaded and status restored.
  2. It is very flexible. The user can use one window to browse one group a time, or can use multiple window each to browse a group to use multiple groups at the same time.
  3. The use can set an taskbar icon for each group to identify different window fast when multiple window is opened. At least the title in the taskbar can be set to the group name instead of the currently displayed tab's book's name.
  4. When the program is invoked from Explorer, the opened file is put into a default group, this also prevent several temporary file open to mess up the commonly opened books.
  5. Put a book to another group by context menu.
GitHubRulesOK commented 3 years ago

We prefer one topic item per bug report, and you raise quite a few items here, however I will try to address it as one topic.

In recent pre-release there is an experimental PDF grouping feature, IT IS very experimental and needs some work to get the best result. Initially it supported other file types but due to differences was cut back to PDF only. If you try to use it for other filetypes then expect instability.

To see it in operation, it works well with PDF files that already have bookmarks, So find one with even just one bookmark then right click the bookmarks area to open new bookmarks (the TOC editor). You should experiment with that adding and removing entries to understand how virtual PDF works. Try changing the entries colour bold / italic fonts to enhance important entries. Play with save as PDF but beware it will strip the existing bookmarks (I did warn you its experimental) The more useful feature is save as virtual.vbkm.

If you have PDFs without bookmarks it can still work. but this is where the system has not yet been improved. I will often add dozens of single page pdfs into one vbkm so that group is one tab with dozens of "bookmarks" (one bookmark per page). apply colours and fonts to taste at this stage, changing later can undo the next step. image

Note at first it appears those bookmarks don't work even though I can scroll through all the pages. This is where your editing and numeracy skills need to come into play as you need to edit the vbkm externally (avoid using the ToC editor to bump the entries) Now for each entry you need to cumulate the page references.

For the simple example above it looks like this image

You may note there is a minor bug that the last Page 5/5 does not show its number in the page counter window, but then all numbers will appear odd (they are file relative page#/Total) so just ignore that window. But note I was able to edit the last line from tiger.pdf page:1 to tiger.pdf page:5 For intermediate pages its a case of count the total before that entry then increment so for the 3 page file starting as page 2 it is also a no brainer to alter that to color:#ff0000 page:2

With experience you can avoid the pitfalls and have a crude but efficient means to open inter-related files with the ability to navigate via bookmarks.

start with small groups but once you have got a few working well try introducing changes such as cutting and pasting large groups of filenames perhaps from a spreadsheet of entries. beware the differing needs to omit quotes for some entries including files and paths without spaces but its essential for some filenames with them. Also beware if just ONE file in the group was deleted or mis-spelt i.e. not found then the whole file becomes invalid and will not work.

Regarding Icons, Windows will only apply a single common icon for all vbkm files so if you want different icons you need different shortcuts, and as usual you can add those to the taskbar image

Adding files via context or explorer is beyond SumatraPDFs current intent, however it should be possible to script such events if you have any personal scripting skills or your friends ability to append the entries to an existing vbkm.

zkosk commented 3 years ago

@GitHubRulesOK Does bookmark modify the PDF file? I want to keep PDFs untouched. BTW modify a 100MB PDF file may take some time.

GitHubRulesOK commented 3 years ago

Using the Bookmarks ability is an external file so does NOT chance the source PDF it adds a separate file.vbkm (or .bkm)

Using save as PDF will merge files together without bookmarks so always save as a new filename. That's Similar to saving comic book or image files as a PDF using normal "Save As"

Using the annotations (highlights on pages) will alter source file by adding on save so THERE use CTRL "save as" new name

zkosk commented 3 years ago

Which version support the experimental feature? How do you create a virtual pdf that contains several pdf? Can you provide some reference link?

GitHubRulesOK commented 3 years ago

Virtual PDF feature is only in pre-release (has all experimental improvements, and occasional problems, so always keep a back-up copy of the one you last found useful) the current 64bit https://www.sumatrapdfreader.org/dailybuilds.html is likely to help with your current save settings issue, and you can use the zipped portable one to test out the features before uninstalling your current version. There are no instructions as it is very much a fluid work in progress, but I give hints above and in forum posts how it may be used (or have problems), search for "vbkm" vbkm is withdrawn so this question remains open for now.