Usage
The tool will add a "Sync Views" button to the Add-ons toolbar, and also a menu item to the View ribbon (or the View menu): With at least two documents open, start the tool. It will give a dialog: Documents
- Select the documents you want to view. The menu adds the number of pages in the document at the end.
The Show button brings the selected document to the front.
If the dialog has more than 2 documents listed, there will be a [-] button to remove this document from the sync.
Starting page can be adjusted if the option to sync page numbers is not active.
- The tool can sync more than two documents, if desired. If there are more than 2 documents open, select the [+] to add another document picker.
- Pick which aspects you want to synchronize between the documents.
- If you want the tool to set up split views, pick vertical or horizontal split views
If page sizes differ between the documents, the "Scale view" option will move the pages relative to the page borders, rather than the same absolute distance
- If you selected "Do not show this again" in any of the pop-up dialogs, you can reset them here.
Edit Sync re-opens the Sync Views dialog box to change which documents, the pages, the sync options, etc.
Cancel returns to they synchronized documents.
There's also a checkbox to hide this pop-up dialog and go to the option you select (except cancel) without asking next time.
Stop Sync just cancels the sync (and returns the documents to one tab group if the vertical/horizontal split was used).
Installation
Unzip and save in JavaScripts folder, then restart PDF XChange. You may need to make the folder. Either in
C:\Users\[USERNAME]\AppData\Roaming\Tracker Software\PDFXEditor\3.0\Javascripts
OR
C:\Program Files\Tracker Software\PDF Editor\Javascripts
If you are using PDF-XChange before build 393 you'll also need xutils downloadable from here:
viewtopic.php?t=44731
Translations
This tool can be translated using 1ang.js. Save the translation file into the Javascripts folder also, and the tool will pick up and use the translation for your currently selected language in PDF-XChange. I've attached the template translation file below and the tool at viewtopic.php?p=186101#p186101 will help editing the file to add translations. I added a machine translation (Google translate) to simplified Chinese "CHS" and Ukrainian "UKR" (I have no idea how accurate it is!)
tl;dr
I re-wrote the tool to address issues with security settings, as well as rounding problems with page coordinates. It also uses the updated app.setInterval() method that allows functions to be assigned directly. This eliminated the need for a global variable to hold the interval, and let me enclose all its data inside the function. I added options to allow splitting horizontally or vertically, and which aspects of the view should be synchronized.
Limitations/known bugs
- If using the ribbon (horizontal) continuous views, and documents have differing page sizes, there will be some weird results: While scrolling in large pages, the page number in other synchronized document(s) will jump around wildly. Small pages may get stuck off-screen. This, I think, is because the script is trying to set the scroll position past the edge of a smaller page -- I've spent way too much time trying to figure it out and so far haven't succeeded. Workaround is: don't use ribbon continuous views with this tool if the document pages differ from one another.