Copy link to clipboard
Copied
Is it still not possible to sort bookmarks alphabetically?
Thanks
Copy link to clipboard
Copied
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);
@+
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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]
Copy link to clipboard
Copied
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);
@+
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
I initiated a console window in Acrobat, but I am not sure how to run this script from the console window? When I try to paste the script into the scripts window, nothing happens?
Sorry, not my strong point
Copy link to clipboard
Copied
Hi,
You have to select all the script in the console window then press the ENTER key (from the numerical panel).
@+
Copy link to clipboard
Copied
How to use the Console: https://acrobatusers.com/tutorials/javascript_console/
Acrobate du PDF, InDesigner et Photoshoptographe

