Set Bookmarks to Focus to the Top of the Page

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
standish-001
User
Posts: 76
Joined: Sun Apr 01, 2018 2:45 pm

Set Bookmarks to Focus to the Top of the Page

Post by standish-001 »

Hi,

Seems like bookmarks are attached to specific text / physical locations of the page.

I've got a long book with a Table of Contents. I've converted that Table of Contents to bookmarks. Works well! There they sit in the bookmarks pane.

However, sometimes when I click a bookmark, it will take me to the PAGE but...not actually to the bookmarked text.

As a metaphor - imagine a list of names, long alphabetical column. I bookmarked the name Dddoghouse.

Clicking the bookmarks takes me to the page, and around the names Czypny. Not focusing the very word Dddoghouse at the top - "Boom! HERE you are, AT the very text you bookmarked." Rather "You're on the PAGE where the text is. Just scroll down a bit. You'll find it."

Is there a way to let clicked-on bookmarks focus the corresponding bookmarked text to the top of the page?

Sincerely,

SW
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17765
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Set Bookmarks to Focus to the Top of the Page

Post by Tracker Supp-Stefan »

Hello standish-001,

There is a way - and you can specify the bookmark to point to a specific area of the page (and also with a specific zoom), but PDF Viewers can also decide to ignore e.g. the zoom level, so if your bookmark target is near the bottom of a page, and someone has set his PDF viewer to ignore zoom levels - and then seems one whole page at a time - even if the bookmark is correctly pointing to "here" the person who clicks your bookmark might still get to "almost here" (the desired page but it's top).

Can you share a sample of your bookmarked content so that I can check if your bookmarks are pointing to the desired part of the page or the top corner of the same?

Kind regards,
Stefan
standish-001
User
Posts: 76
Joined: Sun Apr 01, 2018 2:45 pm

Re: Set Bookmarks to Focus to the Top of the Page

Post by standish-001 »

Hi Stefan,

THANKS! Here's an example. I bookmarked four words on different pages. Named bookmarks same thing as the words with the bookmarks, and used all CAPS:

ROUGHLY, CUTLASS, REEF, BOLTED
4-bookmarks.pdf
(956.68 KiB) Downloaded 66 times
Sincerely,

SW
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17765
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Set Bookmarks to Focus to the Top of the Page

Post by Tracker Supp-Stefan »

Hello standish-001,

Thanks for the sample file! Below you can find a screenshot of what I see on my end with several explanations to follow:
image.png
The steps I took were:
- I opened your file, and located one of the UPPERCASE bookraks
- I clicked it and was taken to the page as you can see it in my screenshot
- I checked the bookmark properties and it is correctly pointing to that page with an offset from the top of 89.8 mm (it's pointing to a Y coordinate of 207.2 and Y increases from the bottom up - Carthesian coordinate system).
- I can see the page as intended and part of the next one as well - but I have "single Page continuous" page viewing mode turned on. If you have "Single Page" you might be taken higher up on that page, or see the whole of it depending on your zoom level and screen size.

Then I changed the value for Y to 150:
image1.png
saved the changes - and your file now opens with "cutlass" on the top of the rendering area when the bookmark is clicked:
image2.png
A copy of your file with the updated bookmark is included.

Kind regards,
Stefan
Attachments
4-bookmarks.pdf
(956.67 KiB) Downloaded 40 times
User avatar
David.P
User
Posts: 1501
Joined: Thu Feb 28, 2008 8:16 pm

Re: Set Bookmarks to Focus to the Top of the Page

Post by David.P »

My experience is, while some PDF viewers, as Stefan points out, can prevent bookmarks or links from changing the current zoom level, any X/Y position defined for the link or bookmark target, respectively, is always respected.

This can be done either by specifying the link target coordinates in X/Y, or by specifying the width and height of the rectangle to be displayed. I believe this is also what Stefan has already explained above.

Image
David.P
PDF-XChange Pro
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17765
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Set Bookmarks to Focus to the Top of the Page

Post by Tracker Supp-Stefan »

Hello David.P,

Yes - even our Editor has an option in the preferences that you can set for whether or not it should honour zoom changes, but "go to this X and Y position on page Z in the PDF file" bookmark locations should be honoured by all PDF software.

Kind regards,
Stefan
User avatar
David.P
User
Posts: 1501
Joined: Thu Feb 28, 2008 8:16 pm

Re: Set Bookmarks to Focus to the Top of the Page

Post by David.P »

Exactly Stefan, thank you.

What I recommend is to normally always enable "Inherit" for the X-coordinate, because this prevents unwanted sideways jumping of the page when clicking on a link or bookmark.

I would even suggest enabling this behavior by default somehow in PDF-XChange Editor. Otherwise, particularly in documents that have just one extra-wide page, the document constantly jumps sideways when clicking on links, bookmarks, or thumbnails. Ad0be seems to have already got a handle on this somehow, as the latter problem doesn't seem to occur with their sᴓftware.

Here is a previous discussion with detailed information on the issue of irritating sideways jumping of the document:
https://forum.pdf-xchange.com/viewtopic.php?f=62&t=22736&hilit=sideways+sideways+jump+horizontal+move#p90750
David.P
PDF-XChange Pro
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17765
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Set Bookmarks to Focus to the Top of the Page

Post by Tracker Supp-Stefan »

Hello David.P,

Most of the time you are viewing documents with pages that are the same size, so the movement on the X axis rarely happens unless it is some say A0 drawing and you need to have bookmarks that would take you around the plot/plan in both dimensions. So I think limiting movement in one axis is not something that should be on by default.

However I would also like to take a look at what you refer Adobe are doing - do you have a sample file that we can test with or a short video that illustrates the behaviour?

Kind regards,
Stefan
User avatar
David.P
User
Posts: 1501
Joined: Thu Feb 28, 2008 8:16 pm

Re: Set Bookmarks to Focus to the Top of the Page

Post by David.P »

Yes Stefan, I shall prepare an appropriate document or video the next time I encounter this issue.

Thank you
David
David.P
PDF-XChange Pro
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17765
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Set Bookmarks to Focus to the Top of the Page

Post by Tracker Supp-Stefan »

:)
standish-001
User
Posts: 76
Joined: Sun Apr 01, 2018 2:45 pm

Re: Set Bookmarks to Focus to the Top of the Page

Post by standish-001 »

Hi Stefan & David,

Seems like I'd need to edit every exiting bookmark? Am I right?

Going forward, is there a way to get every bookmark to have this top-focused behavior by default?

Further - any way to mass edit the existing bookmarks?

Sincerely,

SW
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6813
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Set Bookmarks to Focus to the Top of the Page

Post by Paul - Tracker Supp »

Hi Standish,

I don't know of a way to do this in bulk, no. I think you may have to manually edit each one.

I'll check with the devs in case there is some hidden trick that could be used but I think you are somewhat out of luck here.

:-(
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
User avatar
David.P
User
Posts: 1501
Joined: Thu Feb 28, 2008 8:16 pm

Re: Set Bookmarks to Focus to the Top of the Page

Post by David.P »

Hello all,

at the moment I don't know of any programmatic way or external tool either.

However, it is possible to extract the bookmarks to an *.fdf text file using PDF-XChange Editor, edit it with the text editor of choice (I use MS Word for its easy search and replace function, even using Regex for Dummies) and then import it back to PDF-XChange Editor.

These fdf files are reasonably human-readable, and there is an entry there for each bookmark similar to this:

Code: Select all

/D [359 /XYZ 0 844.38769 null]
(these are e.g. XYZ coordinates for the link target)

Code: Select all

/D [599 /FitV 0]
(this is the page zoom at the link target, e.g. "fit height/vertical")

One of the two numbers 359 or 599 is the link target, which one I just forgot.

With a bit of trial and error, one can quickly find out which numbers one has to replace for the XYZ coordinates, in order to make the link jump to the top of the page in each case. This way, you can batch-customize hundreds or thousands of links in a few minutes, as soon as you got the syntax right.

Unfortunately, we will have to continue to tinker around this way with the bookmarks -- until the below feature request of mine of 2019 is implemented -- for an absolute KILLER feature and another world's first in the history of PDF bookmark management.

Dear Paul & Tracker Team, I would love to give that feature request over there a bump or a ticket if that is possible!

Image

https://forum.pdf-xchange.com/viewtopic.php?f=62&t=33145&p=136654&hilit=Bookmarks+Batch#p136654

Keep up the great work
David
David.P
PDF-XChange Pro
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8371
Joined: Wed Jan 03, 2018 6:52 pm

Re: Set Bookmarks to Focus to the Top of the Page

Post by TrackerSupp-Daniel »

Hello, David.P

Thank you for the suggested potential workaround, I expect that might be a few more steps than desired, but at least it is an option. I have made note of your support for this item, though I cannot at the moment, guarantee implementation or a timeline.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
RedSharpEye
User
Posts: 155
Joined: Mon Oct 25, 2010 6:38 am

Re: Set Bookmarks to Focus to the Top of the Page

Post by RedSharpEye »

David.P wrote: Wed Dec 01, 2021 11:16 am - until the below feature request of mine of 2019 is implemented -- for an absolute KILLER feature and another world's first in the history of PDF bookmark management.

Dear Paul & Tracker Team, I would love to give that feature request over there a bump or a ticket if that is possible!

Image

https://forum.pdf-xchange.com/viewtopic.php?f=62&t=33145&p=136654&hilit=Bookmarks+Batch#p136654
I second David's feature request with great gusto. :D :D


Red
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8371
Joined: Wed Jan 03, 2018 6:52 pm

Set Bookmarks to Focus to the Top of the Page

Post by TrackerSupp-Daniel »

:)
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
RedSharpEye
User
Posts: 155
Joined: Mon Oct 25, 2010 6:38 am

Re: Set Bookmarks to Focus to the Top of the Page

Post by RedSharpEye »

I have noticed that when opening the properties of a bookmark and clicking on actions, edit action ....
image.png
...that the x and y are already poulated and it is just a case of unchecking the inherit check box.

I have 230 bookmarks to do this to, surely there must be a clever person out there to find a way,whether programattically (is that a word?) or a macro or Javascript that can be used to turn off the inherit check box?

It really would be a life saver

Fingers crossed

Red
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17765
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Set Bookmarks to Focus to the Top of the Page

Post by Tracker Supp-Stefan »

Hello Red,

Unfortunately bookmarks are quite complex objects, and what you are editing is one of a possible set of actions that you can add to a bookmark to do:
image.png
So you are editing the "go to a page in this document" action, but a bookmark could technically do a lot more - so there isn't really JS code that can read all actions associated with a bookmark, and edit them. You can set new actions for new bookmarks, or you can execute the already set actions for a bookmark, but you can't really edit existing actions via JS I am afraid!

Kind regards,
Stefan
RedSharpEye
User
Posts: 155
Joined: Mon Oct 25, 2010 6:38 am

Re: Set Bookmarks to Focus to the Top of the Page

Post by RedSharpEye »

Thanks Stefan

I didn't appreciate the complexity of a bookmark :shock: ....think I'll stick with David.Ps export import workaround.

Cheers

Red
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17765
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Set Bookmarks to Focus to the Top of the Page

Post by Tracker Supp-Stefan »

:)
igorlima
User
Posts: 174
Joined: Sat Aug 22, 2020 12:16 pm

Re: Set Bookmarks to Focus to the Top of the Page

Post by igorlima »

Hi all, +1 for a function to edit all bookmark to ignore inherent and just go to the top of the page. I download pdf from my company to work in but their bookmark always comes with inherent x and y so when you click on a bookmark you are not sure sometimes if you have to go up or down the page to see the first one in the document. If this function could be implemented that would be really cool!
Igor
PDF-XChange Editor fan :)
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8371
Joined: Wed Jan 03, 2018 6:52 pm

Re: Set Bookmarks to Focus to the Top of the Page

Post by TrackerSupp-Daniel »

Hello, igorlima

Thank you for the support, Unfortunately I cannot guarantee a change will be coming. As Stefan has mentioned, mass editing of bookmark data is complicated due to the large number of possible actions that could be assigned. After speaking with the Dev team leader personally, he has confirmed that while it may be possible to reconsider in the future it is not a priority item at this time.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

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