These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Bookmark Open Properties

jupiter2
Registered: Jan 16 2008
Posts: 4

I use an ArtsPDF program to do batch processing for me. Right now i have a process to find bookmak that starts with "1." and so on and open a document called "Document 1.pdf" within the same file folder. However i need to find out how to do this with a variable file name instead of a static file name. For instance:

If bookmark starts with "1." then open file within the same folder as the document that contains the open pdf file, but the document always starts with "1." (with a few spaces after the period) but after the periods the text can be any name.

Is there any code or some references where I can find the information? The processing software allows for javascript. My programming skills are a little rusty. I am sure it is just something really simple but cannot figure it out.

Thanks a lot!

KEN

My Product Information:
Acrobat Pro 5.x or older, Windows
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi jupiter2,

You should contact ArtsPDF and see what they have to say about the abilties of their program for this task. It may operate differently than an Acrobat solution.

Hope that helps,

Dimitri
WindJack Solutions
www.windjack.com
jupiter2
Registered: Jan 16 2008
Posts: 4
Yeah... here is what I got from them.

Hi Ken,

Yes, a JavaScript will allow you specify a variable in the path, using Aerialist won't allow that approach as such. I'll have a quick go at coding the JavaScript for you.

Regards,
- Sean.

and then this:

Hi Ken,

Take 2: There's a security limitation with JavaScript in that it cannot access the filesystem. What this means for your problem is that we cannot open a document unless we know the filename in advance.

Normally the approach would be to create a filesystem object that returns all files in a given directory(s) which would then allow me to query each file, however this is not possible with JS's limitations.

Another approach would be to generate an index of files in the folder in a text file -- I could then use this to match against the bookmark prefix.

To create a list of filenames, open command prompt (Start > Run > cmd), navigate to the required directory and type in:I am very far in debt, so after this exhibition I need a new job out of it, and back to Melbourne (or elsewhere)

dir *.pdf /b > FILES.txtThis will write the filename of all PDFs in the folder to a text file, FILES.txt -- email this to me.


Regards,
- Sean.

What do you think?
thanks a lot
KEN