Typing Out the Complete File Path for Proofs

B. wrote:
My employer recently instituted a new rule at our agency that requires us to include, among other things, the complete file path of the InDesign file on all proofs. Obviously, this isn’t part of the info included in the “File Information” option in the Print Dialog. Do you know of any way to automatically add the file path when printing?
While there are some very good plug-ins that can help with this kind of thing (those from Triple Triangle and Gluon come to mind), it’s extremely easy to do this in InDesign CS3 without any help from outside sources. The trick is to use text variables.
First, choose Type > Text Variables > Define. Click New and choose File Name from the Type pop-up menu. Pretty cool, but before you click OK, note that you can select the Include Entire Folder Path checkbox!
Now click OK. From the Define Variable dialog box, you can click Insert to tell InDesign to “type” the variable right away at the current text cursor position. Or you can click Done. When you want to insert the variable (perhaps in a slug area off the side of the page), you can choose Type > Text Variables > Insert Variable > and then choose the name of the variable you defined.
By the way, you may not see the variable update immediately. Text variables only update on screen when you change the view (zoom in/out, change pages, and so on). One other thing to watch out for: Variables cannot break across two or more lines. They’re always treated as a single character. So if your file path is really, really long, you might see some weirdness.
I love text variables; they’re incredibly helpful when you have data such as this that can change.
This article was last modified on December 19, 2021
This article was first published on July 1, 2008
How can I reach the text variable which is defined?
I want to take the Script for one of all text variable be define. Help me. Thanks
You are so right Dave :-)
Of course. When America is switching to mm for god’s sake !!!
Kidding, as I am french, I forget too quick that people may use other units.
So as Dave pointed it, you should use this version of the script :
var myframe = app.activeDocument.textFrames.add({geometricBounds:[“-5mm”,”-5mm”,”0mm”,”150mm”]});
myframe.contents = app.activeDocument.fullName;
Copy paste in a text editor
Save it as proofpath.jsx
then launch it within Indesign.
Regards,
Loic
Loic,
If you’re going to use strings for geometricBounds, you should include the units too. People using inches are going to get a mighty large text frame from your script.
Dave
For those that don’t have CS3, here is a script :
var myframe = app.activeDocument.textFrames.add({geometricBounds:[“-5″,”-5″,”0″,”150″]});
myframe.contents = app.activeDocument.fullName;
It can be improved a lot but basically it will create a text frame on the left top corner (in the bleed area) then fill it with the filepath of the document.
Won’t work if no document is open and yet saved.
Loic
And if you save this variable in a slug in a template file, it just does wonderful things…like remembering to add the path even when I don’t.
Just so nobody goes crazy, this feature is only available in CS3. I seem to remember some scripts floating around for earlier versions.
Yeh variables get all squashed and the letters overlap when there isn’t enough room.
I either, create a really long text box and place the variable in there.
Or a really short box, with a one celled table, and let the table extend out really far, to accomodate long sentences.
The good thing about putting variables in a table is that it won’t get squashed and overlap when it gets too big, it will actually overflow.
So when you go to print, you get the warning of an overflown text box and it gives you the page number, I think.
I prefer the table method as a more desireable method than the text box, because who wants a variable for text that is squashed and overlapping and illegible?
I have to admit, the table option isn’t suited for all variables or cases but it’s definitely an option.