2 Replies Latest reply: Oct 3, 2013 7:24 AM by Ramjivk RSS

    Apply Alt text for all the images in the doc

    Ramjivk Community Member

      Hi All,

       

      I have a document with many images. All the images are created in Illustrator and Photoshop which has the document title information updated for each image.

       

      When i place the image in InDesign, i have to manually select each image frame and change the ObjectExport option to XMP:Title so that when i export the text as PDF, the ALT text will appear in the doc.

       

      I wrote a script which throws an error message. unable to fine what could be the issue.

       

      can anyone help on this issue

       

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

       

      myRectangle = app.activeDocument.allGraphics; 

          myTotalImages = myRectangle.length;

         

         for(var i=0; i<myTotalImages; i++)

          {

             

           myRectangle[i].objectExportOptions.actualTextSourceType = SourceType.SOURCE_XMP_TITLE;

           

              }

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

       

      Regards

      Ramji V K

        • 1. Re: Apply Alt text for all the images in the doc
          AnshulJain19 Employee Hosts

          Hi Ramji,

          Actually your script is trying to apply actual text property on graphic itself which is not possible in InDesign. If you select graphic not its container and try to apply Object Export options then they are disabled. So you will have to make change in your script to apply actual text on graphic container and not graphic. Below is modified script:

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

          myRectangle = app.activeDocument.allGraphics;

              myTotalImages = myRectangle.length;

            

             for(var i=0; i<myTotalImages; i++)

              {

               

                myRectangle[i].parent.objectExportOptions.actualTextSourceType = SourceType.SOURCE_XMP_TITLE;

              

                  }

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

          Thanks

          -Anshul

          • 2. Re: Apply Alt text for all the images in the doc
            Ramjivk Community Member

            Hi Anshul,

             

            Thank you so much for your response. It is working fine now with your script.

             

            Regards

            Ramji V K