We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
I have Windows 10. In Adobe Acrobat XI Pro, is there a way to add text to a pdf file that gives the path location of the pdf file that changes automatically if the location changes-similar to what MIcrosoft Word Excel does? Please break your answer down to very simple, easy-to follow steps.
Create a new text field. Call it "FilePath". Set it as Read-Only.
Delete any code that is generated automatically and replace it with this:
this.getField("FilePath").value = this.path;
Save your file. Close it and then re-open. The field should now display the current file path.
Mr. Isaacs, thank you so much for your reply. I worked on it. I have not been able to "add a new text field. How do you do that?.
Use Prepare Form in Acrobat Pro.
I'm sorry. I didn't even know how to get started on this reply. I am a novice.
I think I figured out how to create a text field. Go to Tools-Forms-Create-Choose Create a Form from Existing File and Next. Choose current document and continue. Under "ADD NEW Field" I choose "Text Field." I get a box with the name "Text" centered in it. I double-click on the "Text" name and a window called "Text Field Properties" opens up.
Under the General Tab, I change the name to "Filename." I click the read-only box. Under the "Appearance Tab", I do add a border and different color font. I do not check the "Locked" box in the lower left corner. I change nothing else, and click on close.
I go to Tools-Set Document Action-choose "Document Did Save" and OK. I then tried saving the file in a different place and reopening it. There was no file location anywhere on the document at all.
I was very careful not to add a space or use a capital letter in place of a small one and vice-versa. Would the mixup of a capital letter and a small one make a difference? I have no idea what is wrong. I think I had one file I stumbled around with for hours, and got it to work, but now I can't remember which one it is or where it came from.
Is the name of the field "Filename" or "FilePath" ?
Thank you! This solution worked for me. My filepath is a little long for the field. What would you recommend, as part of the path is cut off when I print the document. (The filepath is complete in the field, I must highlight and move to the right to view.) Should I change the size font in the field, or change the size of the field? Not sure which to do, or how to do that.
I found the solution. In my case, I needed to do both, change the font, and expand the field. Under Prepare Form, double clicked on the field to bring up Text Field Properties box, went to Appearance, changed font size, closed, then draged the box to make it as long as was needed.
I am so sorry, try67. I am so confused I was writing to Mr. Isaacs, not that I don't appreciate everyone's help.I think that Bernd Alhelt was right. That maybe I did use the name "Filename" instead of "Filepath." I have tried over and over again to get your steps to work, try67. No luck.
I don't see a way to attach a pdf to this post. I took the file I was working on, and stripped of any personal information. Then I tried to add a link to it. That is something else I am trying to learn to do. The link was to this conversation. Then I went through the steps per try67 to show how they were not working. I was hoping someone could tell me what I was doing wrong. The PDF was a webpage I converted to PDF. Could that be the problem?
Do you see any error message in the console?
Taking two of these points:
> I have no idea what these two replies mean-one from Mr. Isaacs,
> The second one is from "Test Screen Name" and says, "Use Prepare Form in Acrobat Pro."
>Adobe Acrobat is my least known software.
Sorry, wrong advice. You're using very old software, and Prepare Form is in the current version, Acrobat DC. Basically you go into creating or editing forms, which is different in every version to keep us on our toes!
If you're still unable to do it share your file via Dropbox, Google Drive, Adobe DC, etc., and I'll do it for you.
Thanks, I really appreciate the offer. But that wouldn't show me how to do it.
I've explained how to do it...