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

What is the path name for an attached file?

Spleckxa
Registered: Jan 6 2010
Posts: 32

Hello,

I'm using Acrobat 9 Pro and would like to create a PDF document with hyperlinks to the some of the attachments. I can easily create these hyperlinks to the attachments through the "Create Link" feature, but was wondering if there is any way to find out what path name is being used for the hyperlink.

Thanks!

David

My Product Information:
Acrobat Pro 9.2, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
An attachment is a Data object, and each Data object has a path property, which can be accessed using a script.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Spleckxa
Registered: Jan 6 2010
Posts: 32
Thanks for the tip, try67,

I guess I'm going to have to fiddle around with JavaScripting to figure this out.
try67
Expert
Registered: Oct 30 2008
Posts: 2398
However, I don't think you can use this property to open the file, if that's what you intend to do.
An attachment is no longer a file but a part of the PDF. If you want to open it you can do so with a script (only if it's a PDF file, though), but not by using the original path.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Spleckxa
Registered: Jan 6 2010
Posts: 32
That's actually what I would like to do--open an attached pdf file from a hyperlink on the main pdf document. I was wondering if there was any way to get the path name to that attached pdf file. I understand that it is part of the PDF, but Acrobat must be using some type of path name or mapping indicator when a person uses the "Create Link" feature to hyperlink to an attached PDF document.

Would the Data object path property give me the path name or mapping indicator for the attached pdf file?

Thanks again!

David
try67
Expert
Registered: Oct 30 2008
Posts: 2398
I don't think so. A PDF needs to be portable (that's what the P in PDF stands for, after all), so the attachment has to be included in the file, or you would need to send it separately and place it in the right folder for it to work...

I don't think you can use the Link tool to open an attached file. You can use a script, though.
Have a look at the openDataObject method of the Document object. It allows you to open a Data object (an attachment), if you know its name. After you open it, you can tell it to go to a specific page using the pageNum property.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Spleckxa
Registered: Jan 6 2010
Posts: 32
Actually, you can use the Link Tool to open an attached file to a specific page/section. You select the Action "Go to a Page View" and set the link to a page or section in the attached file.

What I would like is the actual path name that Acrobat uses when it creates this link.

Thanks!