386 Feature Request: Apply Bookmark to Page Label

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

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

ANR_Designs_NC
User
Posts: 18
Joined: Wed Sep 24, 2025 6:41 pm

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by ANR_Designs_NC »

Mathew wrote: ↑Tue Sep 15, 2026 8:07 pm This is a bugfix - when page layout is set to two pages or two pages continuous, the script was not able to figure out what page bookmarks point to. Thanks to @ANR_Designs_NC for your patience and help figuring this one out.
applyBkNameToLabel v2.3.zip

Changes in v2.3
  • fix bug getting correct page from bookmark (thanks @ANR_Designs_NC);
  • use xutil.PXEmacro for romanize/aphabetize functions;
  • use _XUTIL_DEBUG_ to output debug information
ANR_Designs_NC wrote: ↑Tue Sep 15, 2026 1:14 pm After downloading and restarting here's the console output.

image.png
Thanks Nelson!
Thanks for getting a fix out for this Mathew. I seem to have another issue. I can't seem to get the popup when I click the "Label from Bookmark" to work.
User avatar
Mathew
User
Posts: 957
Joined: Thu Jun 19, 2014 7:30 pm

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by Mathew »

ANR_Designs_NC wrote: ↑Wed Sep 16, 2026 7:29 pm Thanks for getting a fix out for this Mathew. I seem to have another issue. I can't seem to get the popup when I click the "Label from Bookmark" to work.
Does anything show up in the javascript console?
ANR_Designs_NC
User
Posts: 18
Joined: Wed Sep 24, 2025 6:41 pm

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by ANR_Designs_NC »

Mathew wrote: ↑Wed Sep 16, 2026 7:51 pm
ANR_Designs_NC wrote: ↑Wed Sep 16, 2026 7:29 pm Thanks for getting a fix out for this Mathew. I seem to have another issue. I can't seem to get the popup when I click the "Label from Bookmark" to work.
Does anything show up in the javascript console?
image.png
You do not have the required permissions to view the files attached to this post.
User avatar
Mathew
User
Posts: 957
Joined: Thu Jun 19, 2014 7:30 pm

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by Mathew »

also copy the file xutil.source.js into the javascripts folder. the script now depends on that to convert roman or alphabet into a number.
ANR_Designs_NC
User
Posts: 18
Joined: Wed Sep 24, 2025 6:41 pm

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by ANR_Designs_NC »

Mathew wrote: ↑Wed Sep 16, 2026 8:22 pm also copy the file xutil.source.js into the javascripts folder. the script now depends on that to convert roman or alphabet into a number.
You are the man! That fixed it. Thanks for getting me back up and running.
User avatar
PHK
User
Posts: 1684
Joined: Tue Nov 24, 2020 4:02 pm

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by PHK »

As we all know, thumbnail titles can appear one of two ways: with only the page number or with user-defined titles which is the subject of the bulk of posts in this thread. Unfortunately, that can be forgotten even by experienced users who take full advantage of the title-naming capabilities leading to confusion.

So, Mathew, I am wondering if there is something built into your tool that detects that option state and assures that any operations and output are not in the page number only state? And, if not, should there be? Or could there be?
All best,

FringePhil
User avatar
Mathew
User
Posts: 957
Joined: Thu Jun 19, 2014 7:30 pm

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by Mathew »

ANR_Designs_NC wrote: ↑Wed Sep 16, 2026 8:33 pm That fixed it.
:D
PHK wrote: ↑Wed Sep 16, 2026 8:43 pm As we all know, thumbnail titles can appear one of two ways: with only the page number or with user-defined titles which is the subject of the bulk of posts in this thread. Unfortunately, that can be forgotten even by experienced users who take full advantage of the title-naming capabilities leading to confusion.

So, Mathew, I am wondering if there is something built into your tool that detects that option state and assures that any operations and output are not in the page number only state? And, if not, should there be? Or could there be?
I don't know if javascript can set or get that option(?) Maybe there's an app.setOption() that I'm unaware of -- @Daniel may know(?)
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 13322
Joined: Wed Jan 03, 2018 6:52 pm

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by Daniel - PDF-XChange »

Hello, Mathew

Sorry, alot has happened since last I checked on this thread, to be sure I am asking the Devs the right question... The desire here now is simply to ensure that this option is enabled locally?
image.png
I do not believe there is an option to toggle this at the moment, but if that is the desire, I can most certain check with the experts 8)

Kind regards,
You do not have the required permissions to view the files attached to this post.
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
[email protected]
User avatar
Mathew
User
Posts: 957
Joined: Thu Jun 19, 2014 7:30 pm

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by Mathew »

Daniel: yes I *think* that's what FringePhil is asking.

I saw in the past you'd posted various app.setOption() that are not documented anywhere I know, so I thought there may be something lurking out there. IMO I don't know how useful it is in a javascript unless the script can also check whether that setting is on (so it can ask the user). I'm not a big fan of just changing a setting in a script without asking first ;)
User avatar
PHK
User
Posts: 1684
Joined: Tue Nov 24, 2020 4:02 pm

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by PHK »

Daniel - PDF-XChange wrote: ↑Mon Sep 21, 2026 4:13 pm ...

I do not believe there is an option to toggle this at the moment, but if that is the desire, I can most certain check with the experts 8)

...
Well, it's not exactly expressed as a 'toggle' but it functions as such.

image(1).png

As you might see, I have assigned the F12 hot-key to "Use Logical Page Numbers" from the Thumbnails context menu so I can easily toggle between page labels and numbers regardless of Preference settings. As there is such a tool to toggle, I just thought it might be manipulated in a JS tool or in the app itself. But what do I know?

It is this to whch I was referring above.
You do not have the required permissions to view the files attached to this post.
All best,

FringePhil
User avatar
Mathew
User
Posts: 957
Joined: Thu Jun 19, 2014 7:30 pm

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by Mathew »

A JS method to just toggle would not be useful imo unless JS could also read what the current setting is (otherwise it may turn it off when you want it on).

Better than nothing would be a method to turn it on or off ( ie when the script works on page labels it would assume that you want to be able to see them, so would turn them on).
User avatar
PHK
User
Posts: 1684
Joined: Tue Nov 24, 2020 4:02 pm

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by PHK »

Mathew wrote: ↑Tue Sep 22, 2026 3:55 am A JS method to just toggle would not be useful imo unless JS could also read what the current setting is (otherwise it may turn it off when you want it on).
Thanks for informing me on that.
Mathew wrote: ↑Tue Sep 22, 2026 3:55 am Better than nothing would be a method to turn it on or off ( ie when the script works on page labels it would assume that you want to be able to see them, so would turn them on).
Yes, that's exactly what I had in mind. If the tool is to be working on page titles, the obvious preferred toggle state should be titles on.
All best,

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

Re: 386 Feature Request: Apply Bookmark to Page Label

Post by Sean - PDF-XChange »

:)
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623