NoahScheitler Posted May 10 Posted May 10 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, Quote
ThomasLewis Posted May 10 Posted May 10 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 Quote
NoahScheitler Posted May 13 Author Posted May 13 Awesome, thanks Thomas. I inserted the code and adjusted it for my frame names and it worked like a charm. Quote
Recommended Posts
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.