Copy link to clipboard
Copied
Hello,
I would like to know if there is anyway to organise PDF automatically with a code.
Thanks in advance for your help.
Define "importance". Also, sorting pages and sorting bookmarks are two very different, and unrelated, tasks.
Copy link to clipboard
Copied
Depends on what you mean by "organize", "automatically" and "code"...
Copy link to clipboard
Copied
Thank you for your quick feed-back.
I’m using a tool that generate pdf (100pdf) in one document and i need to organise all these pdf by priorityzing the order and the bookmarks.
my question is if there is a way to run à macro for it instead of doing it manually.
Many thanks
Copy link to clipboard
Copied
Acrobat supports scripting, yes. But you still didn't really explain what you want to do.
Do you mean that you want to re-order the pages in the file based on something? If so, what? Text on the pages themselves? The bookmarks? Something else? You need to be more specific.
Copy link to clipboard
Copied
Indeed i need to reorganize pages and bookmarks the order they appear. In other words i would like to re-order all the pages and bookmarks according the importance they have.
Many thanks.
Copy link to clipboard
Copied
Define "importance". Also, sorting pages and sorting bookmarks are two very different, and unrelated, tasks.
Copy link to clipboard
Copied
If i can only re-order pages, it would be good.
any possibility to do so with a script?
Many thanks.
Copy link to clipboard
Copied
Yes. You can use the movePage command to re-arrange the location of pages in a file.
Bookmarks can also be re-arranged, by the way, but it's much more complicated, especially if there's more than one level.
Copy link to clipboard
Copied
I know we can move pages manually i am looking for another solution like a script or a macro for time savings.
many thanks
Copy link to clipboard
Copied
The method I suggested is using a script. If you explain how to determine the "importance" of a page then I could let you know if the entire process can be automated...
Copy link to clipboard
Copied
The method i use to determine the « importance » is the header name of the pages.
many thanks
Copy link to clipboard
Copied
What do you mean? Try being more concrete. Your answers are very vague...
Copy link to clipboard
Copied
what can you propose me as a solution please?
Copy link to clipboard
Copied
We suggest you be less vague. We cannot guess how you would decide what things are important!
Copy link to clipboard
Copied
Maybe provide a sample file that demonstrates what you mean, as your descriptions have not been sufficient so far.
Copy link to clipboard
Copied
Sorry for my late answer.
Ok to provide a sample file, how can i attach it for you?
Many thanks
Copy link to clipboard
Copied
You can email it to me directly (try6767 at gmail.com) or upload it to a file-sharing website like Google Drive, Dropbox, Adobe DC, etc., and post the link to it here.
Copy link to clipboard
Copied
the document is heavy and i have some trouble to send it to you.
Let me try to explain you my needs in other words.
i am looking for a script able to order my pages in my pdf document, i would like to have always in position 4 of my pages the page named «Beauvais » and in position 5, the page named « BRIVE », in position 101 the page named « LYON »....
example: if on the header of the page the name is « BEAUVAIS » the page should be in position 4 ....
the priority of the order depends on the name of the pages.
hope this can help you to understand my needs.
many thanks.
Copy link to clipboard
Copied
PDF pages don't have a name. I'm assuming you're referring to some kind of title text on the page itself.
Identifying such text with a script is tricky, but might be possible. Without seeing a sample file I can't help you any further, though.
Copy link to clipboard
Copied
If you want, extract some pages from the file and send them over, instead of the whole thing.
Copy link to clipboard
Copied
Just sent it to you by e-mail.
Please let me know when received.
Many thanks
Copy link to clipboard
Copied
You'll find the JavaScript functions for moving pages and bookmarks in the Acrobat JavaScript reference here:
As an example of what you can do. There is a tool here for reorganizing pages to match the bookmark order (available to members):