4 Replies Latest reply on Jan 16, 2015 4:12 AM by [Jongware]

    Author filled in automatically - PDF

    maureena43540924

      I would like in each created PDF file under properties that the author is filled in automatically. How can I do this so it happens automatically for each new file? Should I do this in InDesign of Acrobat?

        • 1. Re: Author filled in automatically - PDF
          Willi Adelberger Most Valuable Participant

          I would recommend to do so in InDesign, as it will be written into any PDF created from that file.

          You can create a new document with all presets an define the Document Properties in File > FIle Info… and save this file as InDesign Template File INDT.

          Later, when you create a new document double click on that template to create a new file.

          • 2. Re: Author filled in automatically - PDF
            [Jongware] Most Valuable Participant

            Is this always going to be the same author (you?) for all of your new files, or should it be, for example, the author of the original text you are formatting? (Where each file would have a different author.)

            • 3. Re: Author filled in automatically - PDF
              maureena43540924 Level 1

              Always the same autor for all new files.

              • 4. Re: Re: Author filled in automatically - PDF
                [Jongware] Most Valuable Participant

                Okay -- that is the easiest case!

                Copy the following script into a good plain code editor (the installed ESTK ExtendScript Toolkit is good), and save it as "add_author_info.jsx" into the folder "Scripts/Startup Scripts".

                 

                The best way to locate your Scripts folder is to right-click the folder "User" in the Scripts panel and select "Reveal in Explorer"/"Reveal in Finder". You will see at the very least a single folder called "Scripts Panel". Do not copy the script into that! Create a new folder "Startup Scripts" in this same window, and put the new script in there.

                 

                 

                //DESCRIPTION:Write Author in Metadata
                // Another Jongware Script 16-Jan-2015
                #targetengine "add_author_info"
                
                app.addEventListener("afterNew", add_author_info, false); 
                
                function add_author_info (event)
                {
                    var theDoc = event.parent;
                    theDoc.metadataPreferences.author = "Insert N. Here";
                }
                

                 

                Restart InDesign to make it work. Now all new documents will automatically have "Insert N. Here" in the Author field in File Info, and thus in the exported PDFs.