1 Reply Latest reply on Jan 21, 2014 5:40 AM by Jump_Over

    Loading masters from external file


      Hi everyone! I have a question about loading master pages. To do this I use this simple function


      function copyMasterPages(doc, path) {

          doc.loadMasters(File(path), GlobalClashResolutionStrategy.loadAllWithOverwrite);



      Everything works fine and result document contains all master pages from a file defined by a path variable. But i have a small bug. Text frames in master pages of a result document have the same applied styles as in masters of a prototype document, but they also have additional params: language is set to Hebrew and paragraph direction is set to Right To Left. And (as far as i know) this params never appeared in prototype doc, so it seems to me they are ... default?


      By the way I also load paragraph settings from the same prototype document before loading master pages:


      function copyFontStyles(doc, path) {

          doc.importStyles(ImportFormat.textStylesFormat, File(path), GlobalClashResolutionStrategy.loadAllWithOverwrite);




      If enyone know what can cause this bug, please help me:) Many thanks.