I would like to know if there is anyway to organise PDF automatically with a code.
Thanks in advance for your help.
Depends on what you mean by "organize", "automatically" and "code"...
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.
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.
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.
Define "importance". Also, sorting pages and sorting bookmarks are two very different, and unrelated, tasks.
If i can only re-order pages, it would be good.
any possibility to do so with a script?
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.
I know we can move pages manually i am looking for another solution like a script or a macro for time savings.
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...
The method i use to determine the « importance » is the header name of the pages.
What do you mean? Try being more concrete. Your answers are very vague...
what can you propose me as a solution please?
We suggest you be less vague. We cannot guess how you would decide what things are important!
Maybe provide a sample file that demonstrates what you mean, as your descriptions have not been sufficient so far.
Sorry for my late answer.
Ok to provide a sample file, how can i attach it for you?
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.
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.
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.
If you want, extract some pages from the file and send them over, instead of the whole thing.
Just sent it to you by e-mail.
Please let me know when received.
As an example of what you can do. There is a tool here for reorganizing pages to match the bookmark order (available to members):