Skip to main content
redtagdm
Participant
March 27, 2015
Question

Indesign filename into the meta data automatically

  • March 27, 2015
  • 1 reply
  • 4727 views

I'd like to be able to add the indesign filename into the meta data xmp (File info/Document Title) automatically on all the documents we work on. The reason being our client changes the file name on the pdf's we send and when they return the pdf to us for amends I have little or no way of locating the file amongst 25,000 documents.

1 reply

Known Participant
March 31, 2015

Copy the text between the two lines below.

Paste it into a text editor and save the file as "storeTitleXMP.jsx"

In this folder:

/Applications/Adobe InDesign CC 2014/Scripts/startup scripts/

This script will load at startup of InDesign and will run just before each time the file is saved.

When you view the RAW XML you will see the following listed within the document XMP:

"        <xmp:LCCDocumentStatus>In Progress</xmp:LCCDocumentStatus>

         <xmp:LCCUserName>jhaney</xmp:LCCUserName>

         <xmp:LCCRevisionNotes>More edits</xmp:LCCRevisionNotes>

         <xmp:InDesignFileName>Untitled-7 copy.indd</xmp:InDesignFileName>

         <xmp:CreatorTool>Adobe InDesign CC 2014 (Macintosh)</xmp:CreatorTool>

"

script begins below line

-------------------------

#targetengine 'session'

var myEventListener = app.addEventListener("beforeSave", function (myEvent) {

var doc = app.documents[0];

var docTitle = (doc.name);

var myDocXMP = app.activeDocument.metadataPreferences;

var destNamespace = "http://ns.adobe.com/xap/1.0/";

var destNodeName = "InDesignFileName";

var nodeValue = docTitle;

myDocXMP.setProperty(destNamespace, destNodeName, nodeValue);

}

).name = "storeTitleXMP";

------------------------

script ends above line

Hope this gives you what you need.

Known Participant
March 31, 2015

To access the extended metadata in Acrobat:

Open file

Choose menu "Properties"

with the "Description" tab selected

Click on the button named "Additional Metadata..."

Click on "Advanced"

Click the triangle next to "XMP Core Properties..."

Your custom field will be listed in the fields presented under this item.