Jump to content

Recommended Posts

Posted

Hello,

Quick programming question here. I am working on making a rule for a page switch and cant seem to find something similar here to apply to my situation.

Currently i have 3 pages in this job: A common front and two backs that interchange.

The back pages are identical with the exception of a text box that populates the page with text, one is set with 14.5 pt absolute leading spacing and the other with 13.5 pt leading spacing.

If the 14.5pt page is used by default how could i check to see if the text has too many lines to fit in this box and if so switch to the 13.5 pt page?

Thanks,

Posted

This will tell you if the text in a specified frame fits or not.

var txt_fr = FindTextFrame("frame_14pt");

var fptm = new FusionProTextMeasure;
    fptm.maxWidth = txt_fr.width;
    fptm.CalculateTextExtent(txt_fr.content);

return (fptm.textHeight < txt_fr.height);
//returns true if it fits in the 14pt text frame

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...