0 Replies Latest reply on Oct 23, 2015 4:03 AM by bjarmuz

    Replace textPath page items with placeholders



      I am trying to create a script that will identify TextPath objects and replace them with placeholder objects (for example normal text?)



      for (var i = 0; i < app.activeDocument.allPageItems.length; i++){
           item = app.activeDocument.allPageItems[i];
      function ProcessItem(item){
            if (item instanceof TextFrame || item instanceof Polygon){
       function ProcessTextPaths(item){
              var myTextPaths = item.textPaths;
              for (var i = 0; i < myTextPaths.length; i++){
                  var textPath = myTextPaths[i];
                  //alert(textPath.contents, 'Text Path info');
                  //replace it with something else?


      The reason is that during export to epub format, the bendy text that appears as text on path gets embedded into the background image.

      I want to replace it with placeholders before export and then insert them back in the xhtml manually. It would be best if the placeholders could retain the position info of the text on paths elements, so that I could then just replace the elements without setting the location.


      Thanks in advance for your help!