Copy link to clipboard
Copied
I want a script that would create a hyperlink based on local file names, search the document for each file name, and link it to "[file name].pdf". For example, as a footnote in the pdf, it would say "document1" and "docment2"."document1.pdf" and "document2.pdf" exist in the same folder. I want the script to search for the name of each document in turn, and in the link address just add ".pdf" to the end to hyperlink it.
Is this possible, and if so where could I find more info on how to do this?
Thanks very much!
Copy link to clipboard
Copied
The script can be set to read the contents of that file automatically (if it's location is known, and if the script runs from a privileged context, such as a folder-level file) and use it when searching the file.
This is not a trivial task by any means, though, especially if the file-names can contain more than one word.
I've developed similar tools for my clients in the past, so if you're interested in hiring a professional to create it for you, feel free to contact me privately by clicking my user-name and then on "Send a Message".
Copy link to clipboard
Copied
You can only do it if the other files are also PDFs. However, how would the script know which texts are names of files, and which ones are just other words?
Copy link to clipboard
Copied
All good for the pdfs - all docs will be pdfs. The script would need to take the name of each file in turn in the folder, search the document for that name, and where it finds that name, hyperlink it to [pdf name].pdf
Copy link to clipboard
Copied
That's not possible. A script in Acrobat can't access the contents of a folder. You will need to do that yourself (this is easily done using the command-line console) and then either copy & paste it into the script or read it from a text file.
Copy link to clipboard
Copied
Ah, I see thank you. If I put all of the names of the pdfs in a text file, how would I incorporate that into the Adobe script without editing the script itself each time to include the specific pdf names?
Copy link to clipboard
Copied
The script can be set to read the contents of that file automatically (if it's location is known, and if the script runs from a privileged context, such as a folder-level file) and use it when searching the file.
This is not a trivial task by any means, though, especially if the file-names can contain more than one word.
I've developed similar tools for my clients in the past, so if you're interested in hiring a professional to create it for you, feel free to contact me privately by clicking my user-name and then on "Send a Message".

