UsageI'm often working with technical PDFs where I need to refer to other pages, then jump back to where I was. I usually use a vertical split to do this, but it requires me to keep track of which split is active every time I go to a link or bookmark. There's a built-in "navigate back/forward" feature, but it's not possible to manually set a point that you are navigating back to; or to determine/configure what the steps are that it's navigating to. For me, this means many clicks to get back to where I was, and if I was working in a split-view setup in which I was changing the view often in one side of the split, there may be a huge history to step back just to get the view I wanted.
The tool adds three buttons to the View menu, with keyboard shortcuts: Save View
- This adds the current view to the list of saved views
- This jumps back to the last saved view. It shows how many views are saved, and also deletes the view from the list.
- This opens a dialog listing all the currently saved views.
The dropdown allows you to select between any of the currently loaded documents.
Selecting one of the saved views loads that view. (For older versions of PXCE (before build 393) there will also be a button [►] to load the currently selected view.): Across the top, the buttons:
[… ] dropdown menu with options:-
Select one of the dropdown items to change it.
Avoid Duplicate Views checks if zoom, position, and page match another view before adding it
Automatically Add Views adds a view if page number changes more than Page Threshold, or Zoom increases or decreases by a factor of more than Zoom Threshold
[▲] moves the currently selected view up the list
[▼] moves the currently selected view down the list
[‒] deletes the currently selected view. -
Select one of the dropdown items to change it.
Installation
Installation instructions here: viewtopic.php?p=196006#p196006
Translation
The tool is translatable with 1ang.js. Here are the translation strings:
Code: Select all
# Translation file (requires 1ang v1.0 or later)
# Domain for this translation file is "viewNavigator"
# Filename must be "translationData.viewNavigator.json" and saved in the JavaScripts folder
# It is not necessary for all strings to be included in every language,
# but don't put an empty string "" for the translation, because that's what will be shown!
# This must be formatted as a JSON file except that:
# lines starting with # and empty lines are stripped out before processing
# "Language" is three letter code as output from app.language
# "Original Text" is case sensitive!
# Notice that the last item in a list does not allow a comma after it.
# Format:
# "Language 1": {
# "Original Text": "Translated Text in Language 1",
# "Original Text 2": ["Translated Text 2 singular", "Translated Text 2 plural"]
# },
# "Language 2": {
# "Original Text": "Translated Text in Language 2"
# }
{
"": {
"Saved Views": "",
"Select…": "",
"List of Saved Views\n────────────────────────\nShows a list of the currently saved views so they can be selected, viewed, or deleted.": "",
"Save View": "",
"Save Current View\n────────────────────────\nSaves the current document view to a list so it can be restored later.": "",
"Back %1": "",
"Go Back to Saved View\n────────────────────────\nRestores the last saved view for this document.": "",
"Settings": "",
"Automatically adding views cannot be started while documents are open.\nIt will be enabled after the application is restarted.": "",
"Enter 0 or leave blank to not use this trigger": "",
"Untitled%1": "",
"%1 saved views ◦ %2 selected": "",
"p.%1": "",
"%1 @ %2%": "",
"Avoid Duplicate Views": "",
"Automatically Add Views": "",
"Page Threshold: %1": "",
"Zoom Threshold: %1": "",
"Number of pages to trigger a view save:": "",
"Change in zoom to trigger a view save:": ""
}
}Limitations:
- I think the tool would be a lot more useful if the dialog could be non-modal (ie it could stay open while interacting with the document), or if the list of saved views were a pane (built-in similar to bookmarks, etc). Both of these are rather major development issues I think, so not something that happens in the near future.
- It saves views per document (not per view or tab because javascript can't get information about the tabs). Currently it only saves the views in the current session. I'm thinking it may be useful to actually save the views to the document. LMK if you think that's a smart idea or not.
- BUG: If you switch documents, the back button won't list the correct number of saved views until a view is saved. I've thought of a way to fix this, but it means constantly checking if the active document has changed which seems like a lot of background stuff just for a minor annoyance. I try to avoid having intervals running in the background unless they are doing something useful. If you think it's annoying enough that it's worth fixing, LMK.
- Older versions of PXCE don't show the number of views saved. Before build 393 it adds buttons to the add-ons toolbar.
- If you can think of a better label than "Back" please suggest it.