0 Replies Latest reply on Aug 30, 2010 6:49 AM by GordonEddey

    If this works why does the other scoot off the page?

    GordonEddey Level 1
      Hi, as always thank you for the help. There is some slow but steady progress being made thanks to the help of the contributors to this forum, and I hope someone will help once more.

      Here is my newbie question, regarding cs3:

      I have included the master spreads script which places the page numbers well off the 297mm page, and the text text frame script which works perfectly.

      My question is why does the master spread script below place the boxes at about 323mm, while the text frames in the pages script works perfectly?

      Here is the defective spread script:

      function app_spreads (doc)
      {//function
      with (doc)
      {//doc
      with (doc.masterSpreads[0])
      {//masterspreads0
      with(pages[0]) //recto
      {//pages0
      with(marginPreferences)
      {//marginPreferences0
      top = 15;
      left = 10;
      bottom = 17;
      right = 15;
      //columnCount = 2
      //columnGutter =
      }//marginPreferences0
      with (textFrames.add())
      {//textFrames0
      geometricBounds = [280, 180, 295, 195];
      insertionPoints.item(0).contents = SpecialCharacters.AUTO_PAGE_NUMBER;
      paragraphs.item(0).justification = Justification.RIGHT_ALIGN;
      }//textFrames0
      }//pages0
      with(pages[1]) //verso
      {//pages1
      with(marginPreferences)
      {//marginPreferences1
      top = 15;
      left = 10;
      bottom = 17;
      right = 15;
      //columnCount = 2
      //columnGutter =
      }//marginPreferences1
      with (textFrames.add())
      {//textFrames1
      geometricBounds = [280, 15, 295, 30];
      insertionPoints.item(0).contents = SpecialCharacters.AUTO_PAGE_NUMBER;
      paragraphs.item(0).justification = Justification.LEFT_ALIGN;
      }//textFrames1
      }//pages1


      Here is a snippet of the working pages script, which is also housed in a function:
      textFrameEdd = docEdd.pages.item(1).textFrames.add
        (
      doc.layers.item ('TextLayer'),
      undefined,
      undefined,{
      geometricBounds: [15,15,280,200],
      textFramePreferences: {textColumnCount: 3, textColumnGutter: 6}, 
        })
       
      //textFrameEdd.parentStory.insertionPoints.item(0).place(File('~/Documents/2text2use/pg1p 4222.xlsx'));
      //pg 3 recto
      textFrameEdd = docEdd.pages.item(2).textFrames.add
        (
      doc.layers.item ('TextLayer'),
      undefined,
      undefined,
      {
      geometricBounds: [15,10,280,195],
      textFramePreferences: {textColumnCount: 3, textColumnGutter: 6}, 
        })
       
      textFrameEdd.parentStory.insertionPoints.item(0).place(File('~/Documents/2text2use/1P4221o pener.docx'));
      textFrameEdd.paragraphs[0].appliedParagraphStyle = docEdd.paragraphStyles.item('FLUSHparaBody');

      As always, thank you.