Skip to main content
Correct answer bebarth

Hi,

Try this script I wrote some years ago from the console window:

function triSignets(signet) {
	if (signet.children!=null) {
		signet.open=true;
		var leSignet=signet.children;
		lesSignets=[];
		for (var i=0; i<leSignet.length; i++) lesSignets.push(leSignet[i].name);
		lesSignets=lesSignets.sort(function(a,b){return a.localeCompare(b)});
		for (var i=0; i<lesSignets.length; i++) {
			for (j=0; j<leSignet.length; j++) {
				if (lesSignets[i]==leSignet[j].name) {
					signet.insertChild(leSignet[j],i);
					break;
				}
			}
		}
		if (leSignet!=null) {
			for (var i=0; i<leSignet.length; i++) triSignets(leSignet[i]);
		}
	}
}
triSignets(this.bookmarkRoot);

@+

2 replies

New Participant
March 29, 2025

It’s surprising this isn’t a built-in option yet. A manual workaround might be sorting them in a folder and reordering as needed.

 

[Spam link removed]

bebarth
bebarthCorrect answer
Braniac
April 1, 2025

Hi,

Try this script I wrote some years ago from the console window:

function triSignets(signet) {
	if (signet.children!=null) {
		signet.open=true;
		var leSignet=signet.children;
		lesSignets=[];
		for (var i=0; i<leSignet.length; i++) lesSignets.push(leSignet[i].name);
		lesSignets=lesSignets.sort(function(a,b){return a.localeCompare(b)});
		for (var i=0; i<lesSignets.length; i++) {
			for (j=0; j<leSignet.length; j++) {
				if (lesSignets[i]==leSignet[j].name) {
					signet.insertChild(leSignet[j],i);
					break;
				}
			}
		}
		if (leSignet!=null) {
			for (var i=0; i<leSignet.length; i++) triSignets(leSignet[i]);
		}
	}
}
triSignets(this.bookmarkRoot);

@+

silsurf@me.com
Inspiring
April 27, 2025

Thanks very much,

I might need a bit of help using this? Is this a terminal function, or is there a console within Acrobat where code can be used?

Henry

try67
Braniac
March 29, 2025

It can be done using a script, like this (paid-for) tool I've developed:

https://www.try67.com/tool/acrobat-sort-bookmarks
Please note, though, that the tool does NOT sort the pages the bookmarks point to, only the bookmarks themselves.

If you want the pages to be sorted as well I could adjust it for you so that it does it, so contact me privately to discuss it further.