6 Replies Latest reply on Dec 7, 2018 7:07 AM by SergioMatos

    Extract Alt-Texts

    nadine wohlfahrt Level 1

      Hi everyone,


      extracting Alt-Texts directly out of the Indesign-document would be great.


      here is my exact Problem right now:

      I have an older document, with about 200 pictures with Alt-Texts.

      The Alt-Texts are unfortunately entered per hand with the Object-Export-Options in indesign, not in the Picture information itself.


      Now we need only the Alt-Texts somehow extracted in a single Text-File or if possible a thumbnail of the pic with its Alt-Text beneath it.


      Has anybody a solution for this Problem yet?
      I would appreciate a good workflow or workaround without klicking every picture by hand and copy and paste the Text.


      Thank you very much in advance


        • 1. Re: Extract Alt-Texts
          oleh.melnyk Level 3

          So, basically you need to get the plain text out of InDesign, right?


          How about this workflow: export to PDF file, then open PDF in Adobe Acrobat and resave as plain text



          Alternatively, you should be able to open PDF file in Microsoft Word

          • 2. Re: Extract Alt-Texts
            nadine wohlfahrt Level 1

            This brings me just all the plain texts, and not the extracted ALT-texts from the images to the text document.
            Even if it also would extract the alt-texts (but I didn’t see any of them in my first try – did I do something wrong?) I would have to copy and paste the 200 snippets of alt-text out of that document, right?  – It would still be a first solution of the problem, of course.

            • 3. Re: Extract Alt-Texts
              oleh.melnyk Level 3

              Sorry, I probably misunderstood what alt-text is - I thought that was image captions

              Can you clarify what you mean by "extracting alt-texts"? Maybe some screenshots?



              Oh, now I understand what is alt texts... what you need probably can be done with custom InDesign script

              • 4. Re: Extract Alt-Texts
                oleh.melnyk Level 3

                OK, try this script:

                Dropbox - ExportAltText.jsx



                So, basically, all you need is to open your InDesign document, then "open" (double-click) on my script.

                It will go through all images in the document and get all Alt Text, then save them to the desktop txt file in the format:









                • 5. Re: Extract Alt-Texts
                  nadine wohlfahrt Level 1

                  Wow, this seems to work!

                  I tested it only on a small file yet, and will try the bigger one in the next days, because I’m not on my workstation right now.


                  Thank you very much for this script – you are a lifesaver!

                  Best regards, happily,


                  • 6. Re: Extract Alt-Texts
                    SergioMatos Level 1



                    This might not be possible but with the Export Alt Text Script above, can this be then reversed after?


                    After an Export, if I needed to change any of the alt text in the AltText.txt file then import it back to Indesign?





                    //DESCRIPTION: This script will export all all text into single txt document on your desktop.


                    #target indesign


                    var images = app.activeDocument.allGraphics; // .itemLink.name


                    var altTextFilePath = "~/Desktop/AltText.txt";

                    var file = new File(altTextFilePath);




                    for(var i=0; i < images.length; i++){

                        file.write(  images[i].itemLink.name + "\n" + images[i].parent.objectExportOptions.customAltText + "\n\n" );





                    alert('You can find "AltText.txt" file on your desktop', "Done");