2 Replies Latest reply on Apr 8, 2013 8:34 AM by achbed

    CS6 master page problems with CS5.5 script

    Kevin Atkins



      I've an extensive script created for CS5.5, that creates 16 documents, styles them, and adds them to a book file.


      Under CS6, it still works fine, creates all the necessary stylesheets and master pages, but the master page items are shifted.


      I've checked the position with the Page tool, and clicked Show Master Page Overlay, and the centre of the master pages are now sitting at the centre of the spread (which is also the zero point of the ruler).


      I've tried versioning for CS5.5, but I can't get it to stick (compiling simply changes CS6 to CS5").


      Can anyone tell me how to correct the problem? Ideally, I'd like to append the part of my script that creates the master page. This starts thus:


      set currentMaster to master spread "A-Master" of Pub00

                set base name of currentMaster to "Standard Pages"


                tell currentMaster

        make guide with properties {orientation:vertical, location:"138mm"}

        make guide with properties {orientation:vertical, location:"140mm"}


                          tell margin preferences of pages

                                    set top to topMargin

                                    set left to insideMargin

                                    set bottom to bottomMargin

                                    set right to outsideMargin

                                    set column count to docColumns

                                    set column gutter to colGutter

                          end tell


      ... and then I start creating para and character styles, and add various frames with content to the masters.


      Another section to create a master starts with ...


      tell currentMaster

                                    tell page 1


      ... so should I use the 'tell page 1' block to alter the master overlay, or somewhere else?


      Each document only has three different master pages, but I now have to open all 16, and use the Page tool to shift the master overaly, which can be pretty time consuming.


      Any pointers would be most appreciated.

        • 1. Re: CS6 master page problems with CS5.5 script

          I'm seeing this as well, but when I go to override master page items to a normal page.  This code worked fine on CS5, but broke when we updated to CS6.


          on override_master_page_items(p)
            -- Overrides all possible master page items for a given page.
            tell application "Adobe InDesign CS6"

                -- Get the list of items to override
                set i to master page items of p
                set b to {}
                repeat with v in i
                  -- Build the list of items that we will override so we can process it all at   once (for speed)
                    if allow overrides of v is true then
                      -- Only override an item if it is in fact possible to do so.
                      set b to {b, v}
                    end if
                  end try
                end repeat

                -- Override all the items that we found above.
                set overriddenItems to override b destination page p
              end try
            end tell
          end override_master_page_items


          Any help or ideas would be greatly appreciated.

          • 2. Re: CS6 master page problems with CS5.5 script
            achbed Level 1

            Well, I created a new document, set the master pages back up, copy-pasted the master page content from the old document to the new one, and it's now behaving properly.  I suspect there's issues in the file itself (sets some parameter differently in CS5 than in CS6, and it's preserved even through a save-as).  When in doubt, re-do the document from scratch.