Button to return to hyperlink page

Please post any ideas or requests for new features here for the End User Version of PDF-XChange (printer Drivers)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Nemo
User
Posts: 94
Joined: Mon Apr 20, 2020 12:23 pm

Button to return to hyperlink page

Post by Nemo »

It often happens when you are reading through a large PDF that a word is hyperlinked to another page and you tap of the hyperlink, look at the page it points to and perhaps read part of that page, then scroll to the next page, perhaps scroll up again, and then finally you want to return to the page which has the hyperlink to continue reading from there.

It would be nice to have a button which allows you to do this.

At the moment there is a Previous View button but you would have to tap that many times as it goes back through all the scroll operations and finally gets back to the page which had the hyperlink.

It would be good to have a "Return to Page You Jumped From" button to take you back with one tap.


There is a similar issue with Find. When you are reading through a large PDF what you read may prompt you to do a Find for a word elsewhere in the PDF. You type the word in the Find box and tap Enter. That might take you straight to what you want or you might need to tap the Go to Next Entry arrow on the find box to look at the next hit until you find what you are looking for. You then might read part of that page, then scroll to the next page, perhaps scroll up again, and then finally you want to return to the page which was being displayed when you tapped Enter on the Find box to continue reading from where you originally were.

Perhaps the same "Return to Page You Jumped From" button could incorporate that function as well - i.e. take you back to either (a) the page you were on when you last tapped a hyperlink, or (b) the page you were on when you last tapped Enter on the Find box, whichever you did more recently.
User avatar
Sean - PDF-XChange
Site Admin
Posts: 466
Joined: Wed Sep 14, 2016 5:42 pm

Re: Button to return to hyperlink page

Post by Sean - PDF-XChange »

Hi Nemo,

Thanks for the suggestion, but I'm doubtful that the development team will go for this, as there are already a few ways to do what you are trying to do. There is the 'Previous View' button that you suggested, which can get you back to where you were in a few clicks, and there is also the Links pane, which will get you there in a single click:

image.png

I'd suggest you give that a try and see how you like it.

Kind regards,
You do not have the required permissions to view the files attached to this post.
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Nemo
User
Posts: 94
Joined: Mon Apr 20, 2020 12:23 pm

Re: Button to return to hyperlink page

Post by Nemo »

Hi Sean

A couple of points:

When you say that "There is the 'Previous View' button that you suggested, which can get you back to where you were in a few clicks", are you aware that each scroll up of down on a touchscreen counts as a "view"? In the real world we are talking about "many" clicks rather than a "few" clicks. It is not just having to physically click many times (which is not that difficult) but the fact that you have to make a mental note of where you started from and then mentally check, with every click, whether you have got back there.

With regard to the Links pane, as far as I know there is no button there which will automatically take you straight back to where you started (if there is, let me know as that is exactly what I want!). I assume what you mean is that you could scroll and find in the Links pane the link you came from and then click on its page number. But how will you identify the link? All you have to go on is the text of the link (often quite cryptic) and the number of the page that the link is on. If you have jotted down the page number then it would be easier just to type in the page number at the bottom of the screen rather than look for it on the link panel but jotting down the page number every time isn't very practical. Most people can't remember a number when they are concentrating on reading.

I think if you actually try all this for yourself you will see that the currently available methods really aren't very practical.

Kind Regards
User avatar
Sean - PDF-XChange
Site Admin
Posts: 466
Joined: Wed Sep 14, 2016 5:42 pm

Re: Button to return to hyperlink page

Post by Sean - PDF-XChange »

Hi Nemo,

Yes, you're right - the 'previous view' option is best to use when you have not done too much additional scrolling since you used the link.

When you use the Links Pane and click the page number of the link, it takes you to the link and highlights it on the page:

image.png

The link name is often the same as the hyperlink text, which you can make a note of when you click it. Or you can have the Links Pane open and make a note of the link name (if it's different from the text) so that you can locate it easily when you want to return there.

Kind regards,
You do not have the required permissions to view the files attached to this post.
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Nemo
User
Posts: 94
Joined: Mon Apr 20, 2020 12:23 pm

Re: Button to return to hyperlink page

Post by Nemo »

Hi Sean

The problem with the method of using the links panel in the way you suggest is that the link name will not be unique.

For example, say you have a section in a PDF which sets out some proposed new guidance. The bulk of the PDF consists of an analysis and commentary on the guidance. There will be a large number of links to the guidance. The name of the link will almost certainly be in most cases "guidance" because that is the text which the hyperlink would be added to.

So it you are reading paragraph 98, for example, and you click on the word guidance to be taken to the guidance section, you scroll and read it a bit, and then you want to go back, it is no use looking in the links pane for a link called "guidance" because there will be lots of them. How do you know which one to select?

Kind Regards
User avatar
Sean - PDF-XChange
Site Admin
Posts: 466
Joined: Wed Sep 14, 2016 5:42 pm

Re: Button to return to hyperlink page

Post by Sean - PDF-XChange »

Hi Nemo,

That’s a fair point - you’re absolutely right that in documents with multiple identical link names (like “guidance”), the Links pane wouldn’t help identify the specific one from which you came. I appreciate your taking the time to outline that example so clearly.

I can see how a dedicated “Return to Page You Jumped From” feature would make navigation much smoother, particularly in long or reference-heavy PDFs. I’ll pass your feedback along to our development team for consideration. Thanks again for the detailed explanation - feedback like this helps us understand how the tools behave in real-world use.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Nemo
User
Posts: 94
Joined: Mon Apr 20, 2020 12:23 pm

Re: Button to return to hyperlink page

Post by Nemo »

:D
User avatar
Sean - PDF-XChange
Site Admin
Posts: 466
Joined: Wed Sep 14, 2016 5:42 pm

Re: Button to return to hyperlink page

Post by Sean - PDF-XChange »

Hi Nemo,

Unfortunately the development team felt that this was too specific of a request, and would be unlikely to appeal to or be useful for enough users to justify the creation of a feature request. Thank you again for the feedback though, we do appreciate it.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Nemo
User
Posts: 94
Joined: Mon Apr 20, 2020 12:23 pm

Re: Button to return to hyperlink page

Post by Nemo »

Hi Sean

My approach is that a PDF reader ought to be as easy to use as reading a physical book. So everything which you would normally be able to do with a physical book should have an equivalent in the PDF reader.

When you are reading through a passage in a physical book, you may come across a reference ("see pages 762-768") where something is explained in more detail, or where you find the actual text of some statement or document which is being discussed. In that case, if you want to look up the reference, you put a finger in the place where you currently area (or put a sticker there - or, in some expensive hardcopy reference books there are actually coloured ribbons bound in which you can use for the purpose) and turn to the pages which the reference points you to. Then, having read the detail there, you eventually want to return to where you were reading (where your finger is or the sticker is) and continue reading where you left off. This is a very common thing to want to do. There can be several levels of this - e.g. when reading the text of the first reference that might itself have some references which you might want to jump to to read before returning to continue reading where you were in the first reference and then eventually returning to the passage you were originally reading.

It might be that the passage you are reading does not have an explicit reference ("see...") in the text but, nevertheless, what you read prompts you to look up a word in the index and then read a passage that the index points you to, before eventually wanting to return to the passage you were originally reading.

This is a very common thing to do with a physical book so I would have thought that what I am suggesting would appeal to, and be very useful to, anyone using PDF X-Change Editor to read any kind of non-fiction book of substantial size. Of course there are different kinds of documents which you find in PDFs. Some might be short. Some might contain mainly diagrams with little cross-referencing. Some may be limited-life reports with little cross-referencing. But for any non-fiction document of the kind which you need to jump around in I think this is (to me) an obvious requirement.

But I recognise that it is easy to over-estimate the extent to which something useful to you would have more general application. So if the development team feel my suggestion is too specific, I have an alternative, more general, suggestion, as follows:-

You could provide a History pane which shows (in reverse chronological order which seems to be the norm for history lists) the numbers of the pages which the user has viewed together with a word indicating how they got there.

The ways that you can get to any page are by scrolling, by tapping a hyperlink, by tapping a bookmark, by using Find, by using Search, by typing in the page number at the bottom of the screen, or by tapping the "first page" or "last page" buttons. There may be a few more ways I haven't thought of but these are the main ones. The history pane would look like this example.

Scroll to 675
Scroll to 674
Scroll to 673
Scroll to 672
Scroll to 671
Scroll to 672
Scroll to 671
Hyperlink to 670
Scroll to 274
Scroll to 273
Scroll to 272


etc.

So that if you wanted to go back to where you were reading you could tap on the appropriate page number in the History pane (274 in the above example).

PDF X-Change Editor must have an internal history list already (in order for the existing Previous View button to work) so hopefully it would not be too difficult to expose the history information by providing a new History pane.

Kind Regards
User avatar
Sean - PDF-XChange
Site Admin
Posts: 466
Joined: Wed Sep 14, 2016 5:42 pm

Re: Button to return to hyperlink page

Post by Sean - PDF-XChange »

Hi nemo,

Thanks for your detailed post and suggestions, it's easy to understand where you're coming from. However, I'm afraid the development team are unlikely to change their mind - especially as this is the first time a request such as yours has been made. In other words, there is very little demand for such features - and that demand is the main force behind whether or not feature requests get created. Sorry that we couldn't accommodate you this time.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Mathew
User
Posts: 725
Joined: Thu Jun 19, 2014 7:30 pm

Re: Button to return to hyperlink page

Post by Mathew »

Sean - PDF-XChange wrote: Fri Oct 10, 2025 3:24 pm However, I'm afraid the development team are unlikely to change their mind - especially as this is the first time a request such as yours has been made. In other words, there is very little demand for such features - and that demand is the main force behind whether or not feature requests get created. Sorry that we couldn't accommodate you this time.
Hi Sean,

This request sounds like it comes from a similar direction that viewtopic.php?t=23719&start=50 which has had quite some input over the years. IMO it points to one of the difficulties many of us have dealing with pdfs that does need some careful thought. I very much like the idea of some tool that enables one to "stick a finger in a page" of a pdf so jumping back would be easy. @nemo's suggestion of a pane with a visual list of the view history in the is clever: If one could easily mark the current view so that it would be easy to find again, that would be a bit like leaving a finger in a page while looking at something else ;)

In my case, I'm working with technical drawings: There will be an overall plan drawing that references other drawings (this can go a few levels deep, so probably multiple "fingers" are needed...). More and more commonly, these references will be hyperlinked to take one to the referenced drawing, but one will end up moving around that page/zooming/etc. The ability to jump right back to the original plan would be incredibly helpful. I work around it by splitting the view and using one view for the reference plan, and the second view to look at any references. But it's fundamentally the same issue @nemo was describing.

I very much appreciate both the workload of the developers, as well as the desire to prevent excessive bloat in the software. It's also much in the direction of "pdf reader" rather than "editor" so may not be something that fits well. It may be something that javascript can accomplish, so I've added it to my list of ideas to explore, too.

best regards,

- Mathew.
Mathew
User
Posts: 725
Joined: Thu Jun 19, 2014 7:30 pm

Re: Button to return to hyperlink page

Post by Mathew »

[edit] I posted a more complete version of this tool here: viewtopic.php?t=48179

OK, this is a first pass at a javascript tool.

It adds two buttons to the View ribbon (or the view menu in the classic UI):
image.png
Save View saves the current view to a list so it can be restored.
Back restores the most recent of the saved views (and deletes it from the list). It shows the number of saved views in square brackets.

Installation instructions here: viewtopic.php?p=196006#p196006
viewNavigator v0.1.zip

Limitations:
  • It saves views per document (not per view or tab because javascript can't get information about the tabs).
  • BUG: If you switch documents, the back button won't list the correct number of saved views.
  • Older versions of PXCE don't show the number of views saved. Before build 388 it adds buttons to the add-ons toolbar.
  • If you can think of a better label than "Back" please suggest it.
You do not have the required permissions to view the files attached to this post.
Last edited by Mathew on Fri Oct 31, 2025 10:07 pm, edited 1 time in total.
User avatar
Sean - PDF-XChange
Site Admin
Posts: 466
Joined: Wed Sep 14, 2016 5:42 pm

Re: Button to return to hyperlink page

Post by Sean - PDF-XChange »

Hi Mathew,

Thanks for your input and for creating this javascript tool - I hope it can assist other users in achieving what you are trying to do. As indicated, I'm afraid the development team feel this feature is too niche too warrant full development, but I'm sure your custom tool will be of some assistance to those users who do want such a feature.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Nemo
User
Posts: 94
Joined: Mon Apr 20, 2020 12:23 pm

Re: Button to return to hyperlink page

Post by Nemo »

Hi Matthew

It is good to know I am not the only one who thinks this is important and worthwhile. I suspect that, from time to time, different people realise how useful this would be but it is quite difficult to get across why it is important it you haven't been in the situation as describing it can seem a bit dry.

The best way I can try to describe its importance to the unconvinced would be to say that the time when you really feel the need for such a facility is when your brain is full occupied trying to think through some particularly difficult problem where you have to keep looking things up as you go along and return to where you are reading so that you can get all the information in your head together and then try to think the problem through.

When you are in this situation - and it is just the situation when you are going to be jumping and returning - the least distraction causes you to "lose your thread" so that you have to try to get all the various elements in mind and start thinking again. So although it sounds easy to say "write down the page number to go back to" or "look in the links panel to see if you can find where you came from" and it sounds as if someone is wanting an unnecessary luxury in wanting a "jump back" button, it really is essential because of the way a fully occupied human brain works.

If you have a physical book you can put a finger in your place (or a sticker) and return to it. Part of your brain is doing that but you are not aware of it. It does not require conscious thought and so does not cause you to loose the thread. But for some reason, when you are viewing a PDF, if you have to do anything more than tap a simple "jump back" button, it uses the thinking part of your brain and you lose the thread.

With regard to the question of "pdf reader" v "pdf editor" although "editor" is in the name I always think of PDF X-Change Editor as also being the best pdf reader available. If you compare it to Foxit or Adobe Acrobat it is much easier to use and I think a lot of thought must already have gone into the reader side.

An example of this is finding a page with a bookmark which contain a word in the text you are reading. With PDF X-Change Editor you can double click on a word in the text and it gets highlighted and if you then get up the Find panel you find it is already pre-populated with the word you have selected. Assuming you have already ticked the "whole words" and "include bookmarks" and unticked the "include text" options (which, importantly, you only need to do once) all you have to do is tap Enter on the Find panel and the first (or only) bookmark containing the selected text will appear and be highlighted AND the target page of that bookmark will be automatically displayed. So obviously a lot of thought has gone into designing this so that as few clicks as possible are needed.

By contrast if you are trying to do the same thing with Foxit it does not pre-populate so you have to do a copy/paste (actually probably easier to just retype) and then when the bookmark you want appears you have to tap it to get to the target page. And there is no "whole words" option for a bookmark search. These might seem small things but they make a big difference to whether the operation causes you to lose the thread.

I won't go into the details of trying to do a similar thing with Adobe Acrobat but suffice to say that there is no "bookmark only" search facility. You can search for bookmarks AND text but that is a non-starter for anyone trying to avoid losing the thread.

So PDF X-Change Editor is already the best reader available (so far as I know) and a "jump back" button would make it even better!

For the particular work I do, I create PDFs and I do also read them but the main users of PDFs I create are relatively unsophisticated users (unsophisticated in using PDF readers - may be very sophisticated in other respects!). I can recommend they use PDF X-Change Editor for reading and get some take-up but if I suggest they use it with a javascript I will get nowhere. I myself could use a javascript but it is mainly the users who I am thinking of in suggesting a "jump back" button.

Kind Regards
Last edited by Nemo on Fri Nov 14, 2025 5:41 pm, edited 1 time in total.
User avatar
Sean - PDF-XChange
Site Admin
Posts: 466
Joined: Wed Sep 14, 2016 5:42 pm

Re: Button to return to hyperlink page

Post by Sean - PDF-XChange »

Hi Nemo,

Thanks for your detailed input, we absolutely value such input and feedback from our users - but I'm afraid the view of the development team is unlikely to change in this case.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Mathew
User
Posts: 725
Joined: Thu Jun 19, 2014 7:30 pm

Re: Button to return to hyperlink page

Post by Mathew »

Nemo wrote: Tue Oct 28, 2025 6:20 pm For the particular work I do, I create PDFs and I do also read them but the main users of PDFs I create are relatively unsophisticated users (unsophisticated in using PDF readers - may be very sophisticated in other respects!). I can recommend they use PDF X-Change Editor for reading and get some take-up but if I suggest they use it with a javascript I will get nowhere. I myself could us a javascript but it is mainly the users who I am thinking of in suggesting a "jump back" button.
Hi Nemo,

I see your point - installing a javascript is (intentionally I think) difficult.

There is another way to use scripts though: One can include scripts within pdfs that will run as soon as the pdf is opened. This is a stripped-down version of the script that works as a document script. Go to Document Properties > JavaScript > Add… and paste into the script area
image.png

Code: Select all

/** A simplified version of viewNavigator intended to be included as a document script
  *
  * @author Mathew Bittleston
  * @license MIT
  * @version 0.1
  *
  * History<pre>
  * v0.1  2025-10-31  Initial version (based on v1.1 of viewNavigator)</pre>
  *
**/

var viewNavigatorDocscript = (function() {
    let vnPrefs = {
        autoSet: true, // automatically save a view when jump is larger than factors
        pgChange: 1, // number of pages
        zmChange: 3, // factor on zoom increase or decrease
        addUnique: true, // only add unique views
    };
    // save the views by document
    const savedViews = new WeakMap();
    // auto-set interval
    let aSetInterval;
    // last recorded view by auto-set
    const lastView = new WeakMap();
    
    /////////// add menu items ///////////
    var myIconAdd = {count:0, width:48, height:48, read:function(nBytes=this.data.length/2){return this.data.slice(this.count,this.count+=2*nBytes);}, data:(a=>{let[b,c]=a.split(":");c=c?.match(/.{8}/g);let d=(a,b)=>a.replace(/./g,a=>parseInt(a,10+b)-b);return b.replace(/([g-p]+)([0-9a-f]+|[q-z]+)/gi,(a,b,e)=>(/[q-z]/.test(e)?c[d(e,26)]:e).repeat(d(b,16)));})("poqhgshmqhgshiqhgshmqhgshiqispqmvhnqishiqisnqhgvhlqishiqislqhkvhjqishiqiskqhmvhiqishiqisjqmvmrlvhwhhqishiqisiqlvhgrivjwhgqishiqishqlvkrkxkrkwhgqishiqishqkvjroxjrkwpqishlqjvjrjxjyizixjrjwilqjvkrixjyhzirhzhxjrkwikqjvjrixkyhzirhzixjrjwikqivkrixlyizhrqixkriwikqivkrixjylrqixkriwikqjvjrixiymrqixjrjwikqjvkrixmrqixjrkwilqjvjrjxkrqjxjrjwimqkvjroxjrkwinqkvkrkxkrkwioqkvhwhgrlwipqivkwmrmwjhqhmwhgqkuhpqhkwoqhguhnqhhwoqhkuhoqmwpqhmujhqouirmuitipqoukrkuktkqisiiqoukrjultkqisihqpukriuntjqisihqpukrhuotjqisigqhgukrhgtiqisigqluhkrltiqisigqkuhmrktiqisigqkuhmrktiqisigqluhkrltiqhgshiqpuhtkrhgtiqhgshjqnuitkrptimqmujtkrptinqkuktkrotioqjultkrotipqhuntirotjhqhmtjjqhktjmqhgtkhqkthgq:00000000FFFFFFFFFF42A5F5FF7CB342FF9CC671FFB1B1B1FF989898FF7E5D00FF3F3F3FFFEFEFEFFF000000")};
    var myIconBack = {count:0, width:48, height:48, read:function(nBytes=this.data.length/2){return this.data.slice(this.count,this.count+=2*nBytes);}, data:(a=>{let[b,c]=a.split(":");c=c?.match(/.{8}/g);let d=(a,b)=>a.replace(/./g,a=>parseInt(a,10+b)-b);return b.replace(/([g-p]+)([0-9a-f]+|[q-z]+)/gi,(a,b,e)=>(/[q-z]/.test(e)?c[d(e,26)]:e).repeat(d(b,16)));})("poqhgshmqhgshiqhgshmqhgshiqispqmvhnqishiqisnqhgvhlqishiqislqhkvhjqishiqiskqhmvhiqishiqisjqmvmrlvhwhhqishiqisiqlvhgrivjwhgqishiqishqlvkrkxkrkwhgqishiqishqkvjroxjrkwpqishlqjvjrjxjyizixjrjwilqjvkrixjyhzirhzhxjrkwikqjvjrixkyhzirhzixjrjwikqivkrixlyizhrqixkriwikqivkrixjylrqixkriwikqjvjrixiymrqixjrjwikqjvkrixmrqixjrkwilqjvjrjxkrqjxjrjwimqkvjroxjrkwinqkvkrkxkrkwioqkvhwhgrlwipqivkwmrmwjhqhmwhgqkthpqhkwoqhgthnqhhwoqhkthoqmwpqhmtjhqptjrktiuipqptkrjtkukqisiiqotkrjtlukqisihqotkrjtnujqisihqntkrjtoujqisigqntkrjthguiqisigqmtkrjthhuiqisigqltkrjthiuiqisigqltkrithjuiqisigqmtkrhkuiqhgshiqntkrhjuiqhgshjqntkrhhuimqmtiukrhguinqktkukrouioqjtmukrnuipqhtoujrmujhqhmujjqhkujmqhgukhqkuhgq:00000000FFFFFFFFFF42A5F5FF9CC671FF7CB342FFB1B1B1FF989898FF7E5D00FF3F3F3FFFEFEFEFFF000000")};
    app.addToolButton( {
        cName: "viewNavigatorDocscript_addTB",
        cLabel:  "Save View",
        cTooltext: "Save Current View\n────────────────────────\nSaves the current document view to a list so it can be restored later.",
        oIcon: myIconAdd,
        cEnable: "event.rc = (event.target != null)",
        cExec: "viewNavigatorDocscript.add(this)"
    });
    app.addToolButton( {
        cName: "viewNavigatorDocscript_previousTB",
        cLabel: "Back",
        cTooltext: "Go Back to Saved View\n────────────────────────\nRestores the last saved view for this document.",
        oIcon: myIconBack,
        //cEnable: 'event.rc = !!viewNavigatorDocscript.has(this);',
        cExec: 'viewNavigatorDocscript.previous(this)'
    });

    /////////// private functions ///////////
    // load a viewstate (settingView is a flag to prevent the interval from saving a new view)
    let settingView = false;
    function load(doc,view){
        settingView = true;
        doc.viewState = view;
        lastView.set(doc, Object.create(view));
        settingView = false;
    }
    
    // start the interval
    function startAAInterval() {
        aSetInterval = app.setInterval("viewNavigatorDocscript.docViewCheck();", 200);
    }
    
    // check if view is already in savedViews
    // returns index or -1 if not found
    function isUniqueView(savedViews, newView) {
        // combine six digits
        function toTx(view) {
            const ckProps = ['pageViewZoom', 'pageViewY', 'pageViewX', 'pageViewPageNum'];
            return ckProps.reduce( (a,p) => a + util.printf('%6f',view[p]), '');
        }
        const vTx = toTx(newView);
        
        return (savedViews || []).findIndex( v => vTx === toTx(v));
    }

    /////////// exported functions ///////////
    
    // add the current view
    // returns index of view in savedViews
    function add(doc, atIx, view = doc.viewState) {
        if (!savedViews.has(doc)) savedViews.set(doc,[]);
        // add at atIx
        if (undefined === atIx) atIx = savedViews.get(doc).length;
        // only add unique views
        if (vnPrefs.addUnique) {
            const oldIx = isUniqueView(savedViews.get(doc), view);
            if (oldIx >= 0) return oldIx;
        }
        
        savedViews.get(doc).splice(atIx, 0, Object.create(view));
        console.println("Added page view " + savedViews.get(doc).length)
        return atIx;
    }
    
    // returns number of saved views for this document
    function has(doc) {
        //if (!savedViews.has(doc)) return 0;
        return savedViews.get(doc)?.length;
    }
    
    // restore the most recently added view
    // @param {boolean} remove - removes view from the list if true
    function previous(doc, remove = true) {
        if (!has(doc)) {
            console.println("No saved views.")
            return;
        }
        if (remove) {
            load( doc, savedViews.get(doc).pop());
        } else {
            load( doc, savedViews.get(doc).slice(-1));
        }
    }
    
    // run by interval to check if views changed
    function docViewCheck() {
        const doc = app.doc;

        if (!doc || settingView || !vnPrefs.autoSet) return;
        
        if (lastView.has(doc)) {
            const zm = lastView.get(doc).pageViewZoom / doc.viewState.pageViewZoom || 1;
            // check page or zoom change
            switch (true) {
              default:
                break;
              case (vnPrefs.pgChange && vnPrefs.pgChange < Math.abs(lastView.get(doc).pageViewPageNum - doc.viewState.pageViewPageNum)):
              case (vnPrefs.zmChange && vnPrefs.zmChange < zm):
              case (vnPrefs.zmChange && vnPrefs.zmChange < 1/zm):

                add(doc, undefined, lastView.get(doc));
            }
            
        }

        lastView.set(doc, Object.create(doc.viewState));
    }
    
    // start interval
    if (vnPrefs.autoSet) startAAInterval();
    
    return {add,has,previous,docViewCheck};
})();
It will add two buttons to the Add-in toolbar that only show while the document is open. Also, any link that you follow in the document that changes the zoom or page more than a configurable amount will add a saved view:
image(1).png

You can configure the script. Lines 14-17 have options you can configure:

Code: Select all

        autoSet: true, // automatically save a view when jump is larger than factors
        pgChange: 1, // number of pages
        zmChange: 3, // factor on zoom increase or decrease
        addUnique: true, // only add unique views
You do not have the required permissions to view the files attached to this post.
User avatar
Sean - PDF-XChange
Site Admin
Posts: 466
Joined: Wed Sep 14, 2016 5:42 pm

Re: Button to return to hyperlink page

Post by Sean - PDF-XChange »

Thanks for the input Mathew, I hope that can be of some assistance to Nemo.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Mathew
User
Posts: 725
Joined: Thu Jun 19, 2014 7:30 pm

Re: Button to return to hyperlink page

Post by Mathew »

I made a variation to the above document script that will work with much older javascript versions. It works in Acrobat Reader XI, or PDF XChange 7.0!

I prefer the previously posted script because: I had to use eval() in the script below to access the viewState object in Acrobat through eval(doc.viewState.toSource()); and eval() gives me the heebee jeebees because it can be a security flaw.
image.png

Code: Select all

/** A simplified version of viewNavigator intended to be included as a document script
  *
  * @author Mathew Bittleston
  * @license MIT
  * @version 0.2
  *
  * History<pre>
  * v0.2  2025-11-03  try to make compatible with older javascript; potential security flaw: uses eval(obj.toSource()) to clone object because for...in wasn't working in acrobat
  * v0.1  2025-10-31  Initial version (based on v1.1 of viewNavigator)</pre>
**/

var viewNavigatorDocscript = function () {
  var vnPrefs = {
    autoSet: true, // automatically save a view when jump is larger than factors
    pgChange: 1,   // number of pages
    zmChange: 3,   // factor on zoom increase or decrease
    addUnique: true // only add unique views
  };
  // try to cover Object.create
  function clone(obj) {
    return eval(obj.toSource());
  }
  // try to cover map
  function dMap() {
    this._map = {};
    this.get = function get(d) {
      return this._map[d.path];
    };
    this.set = function set(d, v) {
      this._map[d.path] = v;
      return this;
    };
    this.has = function has(d) {
      return undefined !== this.get(d);
    };
  }
  // save the views by document
  var savedViews = new dMap();
  //new WeakMap();
  // auto-set interval
  var aSetInterval;
  // last recorded view by auto-set
  var lastView = new dMap();

  /////////// add menu items ///////////

  var myIconAdd = {
    count: 0,
    width: 20,
    height: 20,
    read: function read(nBytes) {
      return this.data.slice(this.count, this.count += 2 * nBytes);
    },
  data: 'FF42A5F5FF42A5F5FF42A5F5FF42A5F5FF42A5F50000000000000000000000000000000000000000000000000000000000000000FF42A5F5FF42A5F5FF42A5F5FF42A5F5FF42A5F50000000000000000FF42A5F500000000000000000000000040B1B1B1BFB1B1B1FFB1B1B1FFB1B1B1BFB1B1B140B1B1B100000000000000000000000000000000000000000000000000000000FF42A5F50000000000000000FF42A5F50000000000000000BFB1B1B1FFB1B1B1FFB1B1B1FFB1B1B1FFB1B1B1FFB1B1B1FFB1B1B1BFB1B1B1000000000000000000000000000000000000000000000000FF42A5F50000000000000000FF42A5F500000000BFB1B1B1FFB1B1B1FFC8C8C8FFEFEFEFFFFFFFFFFFFFFFFFFFEFEFEFFFC8C8C8FFABABABBF9898980000000000000000000000000000000000000000FF42A5F50000000000000000FF42A5F580B1B1B1FFB1B1B1FFC8C8C8FFFFFFFFFFCCC4BCFF7E5D00FF7E5D00FFCCC4BCFFFFFFFFFFB9B9B9FF9898984098989800000000000000000000000000000000FF42A5F5000000000000000000000000BFB1B1B1FFC8C8C8FFFFFFFFFFCCC4BCFF72571DFF3F3F3FFFD9D9D9FFDEDBD7FFCCC4BCFFFFFFFFFF989898BF9898980000000000000000000000000000000000000000000000000000000000000000FFB1B1B1FFEFEFEFFFFFFFFFFF7E5D00FF3F3F3FFF3F3F3FFFD9D9D9FFD7D7D7FF7E5D00FFFFFFFFFFEBEBEBFF9898980000000000000000000000000000000000000000000000000000000000000000FFB1B1B1FFEFEFEFFFFFFFFFFF7E5D00FF3F3F3FFF1D1D1DFF000000FF000000FF7E5D00FFFFFFFFFFEBEBEBFF9898980000000000000000000000000000000000000000000000000000000000000000BFB1B1B1FFC8C8C8FFFFFFFFFFCCC4BCFF6E5100FF000000FF000000FF6E5100FFCCC4BCFFFFFFFFFF99A58FDF9AB483FF9CC671FF9CC671809CC671409CC6710000000000000000000000000000000040B1B1B1FFB1B1B1FFC8C8C8FFFFFFFFFFCCC4BCFF7E5D00FF7E5D00FFCCC4BCFFFFFFFFFFA4C388FF9CC671FF9CC671FF9CC671FF9CC671FF9CC671FF9CC671BF9CC67100000000000000000000000000000000BFB1B1B1FFABABABFFB9B9B9FFEBEBEBFFFFFFFFFFFFFFFFFFEBEBEBFFA4C388FF9CC671FF9CC671FF9CC671FFEBF2E6FFEBF2E6FF9CC671FF9CC671FF85B851BF7CB34200000000000000000000000000000000BF989898FF989898FF989898FF989898FF989898FF99A58FFF9CC671FF9CC671FF9CC671FF9CC671FFFFFFFFFFFFFFFFFF9CC671FF85B851FF7CB342FF7CB342407CB3420000000000000000000000000000000080989898BF989898FF989898FF989898EF9BBE7AFF9CC671FF9CC671FF9CC671FF9CC671FFFFFFFFFFFFFFFFFF85B851FF7CB342FF7CB342FF7CB342BF7CB3420000000000000000000000000000000000000000000000000000000000000000FF9CC671FF9CC671FFEBF2E6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE7EFE2FF7CB342FF7CB342FF42A5F500000000000000000000000000000000000000000000000000000000FF9CC671FF9CC671FFEBF2E6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE7EFE2FF7CB342FF7CB342FF42A5F500000000000000000000000000000000000000000000000000000000BF9CC671FF9CC671FF9CC671FF9CC671FF85B851FFFFFFFFFFFFFFFFFF7CB342FF7CB342FF7CB342FF7CB342BF7CB342FF42A5F500000000000000000000000000000000000000000000000000000000409CC671FF9CC671FF9CC671FF85B851FF7CB342FFFFFFFFFFFFFFFFFF7CB342FF7CB342FF7CB342FF7CB342407CB342FF42A5F50000000000000000000000000000000000000000000000000000000000000000BF9CC671FF85B851FF7CB342FF7CB342FFE7EFE2FFE7EFE2FF7CB342FF7CB342FF7CB342BF7CB34200000000FF42A5F5FF42A5F5FF42A5F5FF42A5F5FF42A5F50000000000000000000000000000000000000000BF7CB342FF7CB342FF7CB342FF7CB342FF7CB342FF7CB342FF7CB342BF7CB34200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000407CB342807CB342FF7CB342FF7CB342807CB342407CB342000000000000000000000000'};
  var myIconBack = {
    count: 0,
    width: 20,
    height: 20,
    read: function read(nBytes) {
      return this.data.slice(this.count, this.count += 2 * nBytes);
    },
  data: 'FF42A5F5FF42A5F5FF42A5F5FF42A5F5FF42A5F50000000000000000000000000000000000000000000000000000000000000000FF42A5F5FF42A5F5FF42A5F5FF42A5F5FF42A5F50000000000000000FF42A5F500000000000000000000000040B1B1B1BFB1B1B1FFB1B1B1FFB1B1B1BFB1B1B140B1B1B100000000000000000000000000000000000000000000000000000000FF42A5F50000000000000000FF42A5F50000000000000000BFB1B1B1FFB1B1B1FFB1B1B1FFB1B1B1FFB1B1B1FFB1B1B1FFB1B1B1BFB1B1B1000000000000000000000000000000000000000000000000FF42A5F50000000000000000FF42A5F500000000BFB1B1B1FFB1B1B1FFC8C8C8FFEFEFEFFFFFFFFFFFFFFFFFFFEFEFEFFFC8C8C8FFABABABBF9898980000000000000000000000000000000000000000FF42A5F50000000000000000FF42A5F580B1B1B1FFB1B1B1FFC8C8C8FFFFFFFFFFCCC4BCFF7E5D00FF7E5D00FFCCC4BCFFFFFFFFFFB9B9B9FF9898984098989800000000000000000000000000000000FF42A5F5000000000000000000000000BFB1B1B1FFC8C8C8FFFFFFFFFFCCC4BCFF72571DFF3F3F3FFFD9D9D9FFDEDBD7FFCCC4BCFFFFFFFFFF989898BF9898980000000000000000000000000000000000000000000000000000000000000000FFB1B1B1FFEFEFEFFFFFFFFFFF7E5D00FF3F3F3FFF3F3F3FFFD9D9D9FFD7D7D7FF7E5D00FFFFFFFFFFEBEBEBFF9898980000000000000000000000000000000000000000000000000000000000000000FFB1B1B1FFEFEFEFFFFFFFFFFF7E5D00FF3F3F3FFF1D1D1DFF000000FF000000FF7E5D00FFFFFFFFFFEBEBEBFF9898980000000000000000000000000000000000000000000000000000000000000000BFB1B1B1FFC8C8C8FFFFFFFFFFCCC4BCFF6E5100FF000000FF000000FF6E5100FFCCC4BCFFFFFFFFFF99A58FDF9AB483FF9CC671FF9CC671809CC671409CC6710000000000000000000000000000000040B1B1B1FFB1B1B1FFC8C8C8FFFFFFFFFFCCC4BCFF7E5D00FF7E5D00FFCCC4BCFFFFFFFFFFA4C388FF9CC671FF9CC671FF9CC671FF9CC671FF9CC671FF9CC671BF9CC67100000000000000000000000000000000BFB1B1B1FFABABABFFB9B9B9FFEBEBEBFFFFFFFFFFFFFFFFFFEBEBEBFFA4C388FF9CC671FF9CC671FF9CC671FF9CC671FFFFFFFFFFFFFFFFFF9CC671FF85B851BF7CB34200000000000000000000000000000000BF989898FF989898FF989898FF989898FF989898FF99A58FFF9CC671FF9CC671FF9CC671FF9CC671FFFFFFFFFFFFFFFFFF9CC671FF85B851FF7CB342FF7CB342407CB3420000000000000000000000000000000080989898BF989898FF989898FF989898EF9BBE7AFF9CC671FF9CC671FF9CC671FFFFFFFFFFFFFFFFFF9CC671FF85B851FF7CB342FF7CB342FF7CB342BF7CB3420000000000000000000000000000000000000000000000000000000000000000FF9CC671FF9CC671FF9CC671FFFFFFFFFFFFFFFFFF9CC671FF85B851FF7CB342FF7CB342FF7CB342FF7CB342FF7CB342FF42A5F500000000000000000000000000000000000000000000000000000000FF9CC671FF9CC671FF9CC671FFFFFFFFFFFFFFFFFF85B851FF7CB342FF7CB342FF7CB342FF7CB342FF7CB342FF7CB342FF42A5F500000000000000000000000000000000000000000000000000000000BF9CC671FF9CC671FF9CC671FF9CC671FFFFFFFFFFFFFFFFFF7CB342FF7CB342FF7CB342FF7CB342FF7CB342BF7CB342FF42A5F500000000000000000000000000000000000000000000000000000000409CC671FF9CC671FF9CC671FF85B851FF7CB342FFFFFFFFFFFFFFFFFF7CB342FF7CB342FF7CB342FF7CB342407CB342FF42A5F50000000000000000000000000000000000000000000000000000000000000000BF9CC671FF85B851FF7CB342FF7CB342FF7CB342FFFFFFFFFFFFFFFFFF7CB342FF7CB342BF7CB34200000000FF42A5F5FF42A5F5FF42A5F5FF42A5F5FF42A5F50000000000000000000000000000000000000000BF7CB342FF7CB342FF7CB342FF7CB342FF7CB342FF7CB342FF7CB342BF7CB34200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000407CB342807CB342FF7CB342FF7CB342807CB342407CB342000000000000000000000000'};
  app.addToolButton({
    cName: "viewNavigatorDocscript_addTB",
    cLabel: "Save View",
    cTooltext: "Save Current View\n────────────────────────\nSaves the current document view to a list so it can be restored later.",
    oIcon: myIconAdd,
    cEnable: "event.rc = (event.target != null)",
    cExec: "viewNavigatorDocscript.add(this)"
  });
  app.addToolButton({
    cName: "viewNavigatorDocscript_previousTB",
    cLabel: "Back",
    cTooltext: "Go Back to Saved View\n────────────────────────\nRestores the last saved view for this document.",
    oIcon: myIconBack,
    //cEnable: 'event.rc = !!viewNavigatorDocscript.has(this);',
    cExec: 'viewNavigatorDocscript.previous(this)'
  });

  /////////// private functions ///////////
  // load a viewstate (settingView is a flag to prevent the interval from saving a new view)
  var settingView = false;
  function load(doc, view) {
    settingView = true;
    doc.viewState = view;
    lastView.set(doc, clone(view));
    settingView = false;
  }
  
  function findIndex(arr,func) {
      var ix = -1;
      for (var i = 0; i < arr.length; i++) if (func(arr[i])) {
          ix = i;
          break;
      }
      return ix;
  }

  // start the interval
  function startAAInterval() {
    aSetInterval = app.setInterval("viewNavigatorDocscript.docViewCheck();", 200);
  }

  // check if view is already in savedViews
  // returns index or -1 if not found
  function isUniqueView(savedViews, newView) {
    // combine six digits
    function toTx(view) {
      var ckProps = ['pageViewZoom', 'pageViewY', 'pageViewX', 'pageViewPageNum'];
      return ckProps.reduce(function (a, p) {
        return a + util.printf('%6f', view[p]);
      }, '');
    }
    var vTx = toTx(clone(newView));
    return findIndex(savedViews || [], function (v) {
      return vTx === toTx(v);
    });
  }

  /////////// exported functions ///////////

  // add the current view
  // returns index of view in savedViews
  function add(doc, atIx, view) {
    if (undefined === view) view = doc.viewState;
    if (!savedViews.has(doc)) savedViews.set(doc, []);
    // add at atIx
    if (undefined === atIx) atIx = savedViews.get(doc).length;
    // only add unique views
    if (vnPrefs.addUnique) {
      var oldIx = isUniqueView(savedViews.get(doc), view);
      if (oldIx >= 0) return oldIx;
    }
    savedViews.get(doc).splice(atIx, 0, clone(view));
    console.println("Added page view " + savedViews.get(doc).length);
    return atIx;
  }

  // returns number of saved views for this document
  function has(doc) {
    if (!savedViews.has(doc)) return 0;
    return savedViews.get(doc).length;
  }

  // restore the most recently added view
  // @param {boolean} remove - removes view from the list if true
  function previous(doc, remove) {
    if (undefined === remove) remove = true;
    if (!has(doc)) {
      console.println("No saved views.");
      return;
    }
    if (remove) {
      load(doc, savedViews.get(doc).pop());
    } else {
      load(doc, savedViews.get(doc).slice(-1));
    }
  }

  // run by interval to check if views changed
  function docViewCheck() {
    var doc = app.doc;
    if (!doc || settingView || !vnPrefs.autoSet) return;
    var vState = clone(doc.viewState);
    if (lastView.has(doc)) {
      var zm = lastView.get(doc).pageViewZoom / vState.pageViewZoom || 1;
      // check page or zoom change
      switch (true) {
        default:
          break;
        case vnPrefs.pgChange && vnPrefs.pgChange < Math.abs(lastView.get(doc).pageViewPageNum - vState.pageViewPageNum):
        case vnPrefs.zmChange && vnPrefs.zmChange < zm:
        case vnPrefs.zmChange && vnPrefs.zmChange < 1 / zm:
          add(doc, undefined, lastView.get(doc));
      }
    }
    lastView.set(doc, vState);
  }

  // start interval
  if (vnPrefs.autoSet) startAAInterval();
  return {
    add: add,
    has: has,
    previous: previous,
    docViewCheck: docViewCheck
  };
}();
MIT License

Copyright (c) 2025 Mathew Bittleston

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
You do not have the required permissions to view the files attached to this post.
Last edited by Mathew on Sat Nov 08, 2025 6:01 pm, edited 3 times in total.
User avatar
Sean - PDF-XChange
Site Admin
Posts: 466
Joined: Wed Sep 14, 2016 5:42 pm

Re: Button to return to hyperlink page

Post by Sean - PDF-XChange »

Hi Mathew,

That's a great addition to have - thanks for sharing it, hopefully it will be of some use to other users.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Nemo
User
Posts: 94
Joined: Mon Apr 20, 2020 12:23 pm

Re: Button to return to hyperlink page

Post by Nemo »

Hi Matthew
There is another way to use scripts though: One can include scripts within pdfs that will run as soon as the pdf is opened.
For the particular work I do, the main users of PDFs I create are relatively unsophisticated users (unsophisticated in using PDF readers) and many of them will choose to use software other than PDF X-Change Editor, maybe Foxit or Adobe or quite possibly Google Chrome, so I am wary of doing anything even a little bit "non-standard".

I ran into a problem a while back where optimised PDFs created by PDF X-Change Editor could not be read in Abode. That was a bug which has long since been corrected but it is just an illustration of how a supposedly universal standard (PDF) can be implemented slightly differently by different software and why I don't want to do anything remotely exotic!

Kind Regards
Mathew
User
Posts: 725
Joined: Thu Jun 19, 2014 7:30 pm

Re: Button to return to hyperlink page

Post by Mathew »

Nemo wrote: Sat Nov 08, 2025 2:50 pm For the particular work I do, the main users of PDFs I create are relatively unsophisticated users (unsophisticated in using PDF readers) and many of them will choose to use software other than PDF X-Change Editor, maybe Foxit or Adobe or quite possibly Google Chrome, so I am wary of doing anything even a little bit "non-standard".
Nemo,

I completely understand. I often run into the issue of "just because something can be done doesn't mean it should" with scripting. For me, the above scripts were more a case of my interest in whether I could find a potential solution.

I completely understand the concern with doing something non-standard, and also think it's potentially problematic in my mind including scripts inside pdf's (I actually think that's a security flaw in pdfs -- I think the ISO 32000 standard should separate out pdf that may include scripts to have a different suffix than those that are clean and contain no active content.)

I think offering the option of installing a script on the application that makes using pdfs better is definitely the way to go: Those who cannot/do not want to install it can still use the application without the enhancement; those that do get a slightly better user experience.
image.png
The "back" button already will take a user back to the place they were. It just may take a few clicks as currently implemented. If a user wants something more customizable, and they are willing to install a script, I've provided one viewtopic.php?t=48179

Sean - PDF-XChange wrote: Thu Oct 09, 2025 9:36 am Unfortunately the development team felt that this was too specific of a request, and would be unlikely to appeal to or be useful for enough users to justify the creation of a feature request. Thank you again for the feedback though, we do appreciate it.
For this particular issue, after writing viewtopic.php?t=48179 I've come to the conclusion that actually PDF-XChange is almost there already. It already remembers a "history", it's just that the mechanism for what constitutes the stages of that history is opaque. There have been multiple posts in the past related to what particular mechanism is used to remember a step in the history; I think it should actually be thought of as an "event" model, and the "events" could be (the first two are what I used in the script):
  • page change
  • zoom change
  • distance scrolled
  • click on a link/bookmark/etc
  • time elapsed
The history is already saved internally, so showing that list is just one more step in a progression of this feature. There is a ticket for something similar RT#7063: FR: Alternate "Previous/Next View" options
Related topics:
IMO this current feature request boils down to the ability to customize which events are listened to by the application, and at what threshold (ie amount of zoom change; amount of distance moved; amount of time; etc). Still, though, an unsophisticated user may not be able to adjust that effectively either: If a user is not able to install a javascript to customize their use of the application, they may also not be able to adjust settings in a "history" reliably. I think Sean's point is valid: Trying to guess what all the potential niche cases are is an endless task that would make the application overly complex, less reliable and probably less usable.

- Mathew.
You do not have the required permissions to view the files attached to this post.
User avatar
Sean - PDF-XChange
Site Admin
Posts: 466
Joined: Wed Sep 14, 2016 5:42 pm

Re: Button to return to hyperlink page

Post by Sean - PDF-XChange »

Hi Mathew,

Thanks for the detailed analysis and input - we appreciate it.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Nemo
User
Posts: 94
Joined: Mon Apr 20, 2020 12:23 pm

Re: Button to return to hyperlink page

Post by Nemo »

Hi Matthew

I can see from the links you have provided that you have done a lot of research on this and there have been a number of posts by others on this general topic in the past.

I can see the problem that that everyone might have their own ideas about what events are more important and worthy of being shown as a "previous view". Someone might say that a scroll up and a scroll down is insignificant and they want that to be ignored when they retrace their steps with Previous View. Or that a Zoom change is unimportant etc. And you can't please everyone and if you try to you end up making the options so complex that it makes life more difficult for everyone. I do understand that point.

But it seems to me that there is a fundamental difference between "looking around" - zooming, scrolling, page up, page down - and "jumping" - tapping on a hyperlink or a bookmark, or typing in a page number, or tapping first page or last page.

When you are retracing your steps when "looking around" you might prefer if you didn't have to do quite so many taps but there is no risk of getting lost or wondering "how did I get here?".

By contrast it is very easy when you are concentrating to forget "what you were doing before" if you have "jumped". You can retrace each step with Previous View but the difficulty is in recognising when you have reached the view that you jumped from.

An alternative suggestion would be that, rather than having a "jump back" button, there could be some indication of when you have got back to a view you jumped from. It is not so much having to tap Previous View so many times which is the problem (that is not difficult) but rather being able to instantly recognise when you have reached the view you jumped from. The Previous View button is green. It it turned red when you had got back to the a view you jumped from, that would be very useful.

Kind Regards
User avatar
Sean - PDF-XChange
Site Admin
Posts: 466
Joined: Wed Sep 14, 2016 5:42 pm

Re: Button to return to hyperlink page

Post by Sean - PDF-XChange »

Hi Nemo,

Thanks for the input and suggestions - we appreciate it all.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Nemo
User
Posts: 94
Joined: Mon Apr 20, 2020 12:23 pm

Re: Button to return to hyperlink page

Post by Nemo »

I have found that there is a way of essentially doing what Matthew's script does - i.e. saving a place and going back to it.

If you double-click on the paragraph number (if the paragraphs are numbered) or some other word where you were reading and tap the New Destination button, then, later on when you come to retrace your steps you can go to the Destinations pane and double click on the last listed destination and it will take you back. This is because destinations are initially listed in the order they are added. Once you exit PDF X-Change Editor the list of destinations is sorted but if you are actually exiting you may no longer need the ability to "go back".

Of course this method is only really suitable if you are not actually using Destinations for anything else.

And having to "save the place" as a separate operation is not ideal so it would IMHO be better to have some method which doesn't depends on "saving your place" such as a visual indication when you have got back to the jump point.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12030
Joined: Wed Jan 03, 2018 6:52 pm

Button to return to hyperlink page

Post by Daniel - PDF-XChange »

:)
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com