CS2-JS:Headline over two pages - Adobe Indesign

This is a discussion on CS2-JS:Headline over two pages - Adobe Indesign ; Hello, I got a tricky problem: I'm trying to automate a design that fills two pages. Unfortunately, the headline goes from one page to the other and I need a space in the middle for binding which can change. Is ...

+ Reply to Thread
Results 1 to 6 of 6

CS2-JS:Headline over two pages

  1. Default CS2-JS:Headline over two pages

    Hello,
    I got a tricky problem:
    I'm trying to automate a design that fills two pages. Unfortunately, the headline goes from one page to the other and I need a space in the middle for binding which can change.
    Is there a possibility to control the cursor to go to the next possible insertion point between two characters which is closest to the middle of the two pages and then raise the tracking?
    If it's possible, a little code-help would be great.
    Thx a lot and merry x-mas.

    Konni

  2. Default Re: CS2-JS:Headline over two pages

    from VB:

    Property Bounds As Variant
    read-only
    Member of InDesign.Page
    The bounds of the Page, in the format (top, left, bottom, right) as
    Array of 4 Units (Doubles or Strings)

    Property HorizontalOffset As Variant
    read-only
    Member of InDesign.InsertionPoint
    Member of InDesign.Character
    Horizontal offset of the text as Unit (Double or String)

    calculate width of page from Bounds
    and iterate InsertionPoints/Characters in selected TextFrame for
    HorizontalOffset

    robin


    --
    www.adobescripts.com

  3. Default Re: CS2-JS:Headline over two pages

    Thx for the fast help, but I think it doesn't work with my problem.
    But maybe I just don't understand it right.
    I got one textframe which contains one single headline. I know the position of the frame and now I want to get access to the space between two characters closest to the middle of the frame to raise the tracking.
    Thx Konni

  4. Default Re: CS2-JS:Headline over two pages

    Hi Konstantin,

    Why don't you make two connected textframes.
    The title will flow through both frames.
    You can adjust the position of the textFrames to match the space in the middle for binding.

  5. Default Re: CS2-JS:Headline over two pages

    Use the horizontalOffset of the insertionPoints to find where they are; add kerning to the one nearest the middle of the frame (or the binding of the spread, if the frame is not symmetrically placed on the spread).

    Dave

  6. Default Re: CS2-JS:Headline over two pages

    You can use:

    ipPosns = myParagraph.insertionPoints.everyItem().horizontalOffset;

    to get an array of all the insertionPoints' positions.

    Then if targX contains the x-coordinate of the center, you could simply iterate through that array along these lines:

    myDist = Math.abs(ipPosns[0] - targX);
    for (var j = 1; ipPosns.length > j; j++) {
    myNewDist = Math.abs(ipPosns[0] - targX)
    if (myNewDist > myDist) { break }
    myDist = myNewDist;
    }
    myParagraph.insertionPoints[j-1].kerning = 1000;

    I haven't tested that, but that looks like what you're wanting (you'll need to pick the kerning value that makes sense to you).

    Dave

+ Reply to Thread

Similar Threads

  1. Replies: 3
    Last Post: 08-26-2007, 10:34 AM
  2. Shell - how to get headline?
    By Application Development in forum basic.visual
    Replies: 2
    Last Post: 02-06-2007, 03:21 AM
  3. Headline: transfer javascript-variable to php
    By Application Development in forum Javascript
    Replies: 2
    Last Post: 01-05-2006, 08:01 AM
  4. Headline font similar to Gulliver?
    By Application Development in forum Adobe Typography
    Replies: 6
    Last Post: 11-24-2005, 12:11 PM
  5. Indesign CS applescript to place a story and headline
    By Application Development in forum Adobe Indesign
    Replies: 1
    Last Post: 08-12-2004, 05:00 PM