3 Replies Latest reply on Sep 26, 2016 7:08 AM by przemek.rem

    Automatically add InDesign metadata to Exported PDF

    MvanderZande Level 1

      Dear InDesigners, 


      For the studio I work it became important to make visible which person (Author) worked on a certain document as well as what the latest version of that specific document is. 


      It sometimes happens that clients send us a PDF file (with corrections or changes in it) of an old version of a document.  We now keep only one (latest) InDesign documents and save any changes in there, so there's no real way to notice the PDF and InDesign are different versions. 




      1. Is it possible for a user to have InDesign automatically fill-in the 'Author' field when exporting a pdf? 


      2. Is it possible to have a unique element in an exported pdf that makes it clear it connects to a specific version of an InDesign document? 


      Many thanks in advance! 




      P.S. I am looking into XMP, but am completely new in this, but maybe there's a solution in there?  Additional info: Management now told us, for each change made to a document an incremental document should be saved (adding _v01 and for the next change save it with_v02 and so on), and the previous version kept as it is. For the studio this means a lot of additional (manual) effort and cluttered project folders with numerous files with increasing file name sizes. I'm hoping I can prevent this...

        • 1. Re: Automatically add InDesign metadata to Exported PDF
          Muppet Mark Level 5

          I think this should be possible with a simple script… You can put data into the document XMP that if present is passed to the resulting PDF's XMP… It should just be the case of updating this prior to export…

          1 person found this helpful
          • 2. Re: Automatically add InDesign metadata to Exported PDF
            Eugene Tyson Adobe Community Professional & MVP

            You can add stuff manually in the File>File Info


            It might be possible to script this information into the File Info



            All that info will come up in Acrobat under File>Document Properties.

            • 3. Re: Automatically add InDesign metadata to Exported PDF
              przemek.rem Level 1

              I know it's a very old topic, but didn't want to create another one and found a solution to the subject.

              This script is adding author name (as he logged in in the system) and a path to the document where can be found on the server/harddrive.

              So you can play with it:



              #targetengine document_copy

              (function () {

                  if (app.eventListeners.itemByName ("save").isValid) app.eventListeners.itemByName ("save").remove(); // makes debugging easier and prevents multiple eventListener creations

                  var mySaveEventListener = app.eventListeners.add("afterOpen", save);  

                  mySaveEventListener.name = "save";

              }) ();


              function save()  {


              var doc = app.activeDocument;

              var md = doc.metadataPreferences;

              md.author = $.getenv("USER"); //md.author = "Przemek Rembelski";

              md.documentTitle = GetFileNameOnly(doc.name);

              md.description = app.activeDocument.filePath.fsName;


              function GetFileNameOnly(myFileName) {

                   var myString = "";

                   var myResult = myFileName.lastIndexOf(".");

                   if (myResult == -1) {

                        myString = myFileName;


                   else {

                        myString = myFileName.substr(0, myResult);


                   return myString;





              You just have to place it not as every other scripts in the scripts folder but in the startup script folder (Adobe InDesign -> Scripts -> startup scripts), you may need your admin pass for that.