0 Replies Latest reply on Aug 7, 2014 5:14 AM by RuyRamos

    Convert entire document to arabic style and layout


      Hello everybody!


      I'm currentyl working on a project where we need to convert a final document to a arabic version. We have all styles created and and the left-to-right settings on the text set correctyl. I have created a script that changes all the text content to the correct textcontent.


      My problem is the following: I can recreate the actions done when you run "Reverse layout" by script. I found the possibility to "flip" all page items by running pageItem.flipItem(Flip.HORIZONTAL, AnchorPoint.CENTER_ANCHOR).

      This dose not recreate the actions of the function "Reverse Layout". The textframes and the images boxes are flipped but the possitions of them are not flipped for example if a textframe is placed at the bottom left corner after I do a reverse the textframe is placed in the bottom right corner BUT when I do the flip the content is flipped but the textframe is still on the exact same place...


      I hope somebody understands what I mean: Here is my code if you want to try it first:


      var d = app.activeDocument;
      var pis = d.allPageItems;
      for(var i = 0; i < pis.length; i++){
           var pi = pis[i];
           if(pi instanceof Image){
                //we flip the rectangle not the image

      Oh yeah, you need to have the ME (middle east) version of InDesign to be able to run the "Reverse layout"-function.


      Thank you


      Ruy Ramos