#1
|
|||
|
|||
![]()
A text box is 2.25 inches wide.
Inside of that text box I have placed a field named 'Title' Some titles are very long but the text box is tall enough to accommodate up to 5 lines. Is there a function or rule I can use, that will return the number of lines for any given record as a result of word wrap? For example: 'Title 1' will fit on one line therefore return '1' 'Here is Title 2 and it's a bit longer' - I want to know if this will end up wrapping to 2 lines or 3 lines. (That is, I want the rule to return '2' or '3') |
#2
|
|||
|
|||
![]()
// Use TextMeasure to get the length of each company name
var tm = new FusionProTextMeasure; var frameWidth = 2.25; // set width of the text box (in inches) tm.pointSize = "10 pt"; // set the type size tm.font = "Helvetica"; // set your typeface var str = Field("Title"); // set the field to use tm.CalculateTextExtent(str); tm.useTags = false; var tmWidth = tm.textWidth; var tmNumberofLines = tm.textLines; return tmNumberofLines;
__________________
FusionPro VDP 12.1.3 | Windows 10 Pro | Acrobat DC |
![]() |
Tags |
calculate, word wrap, wrap text |
Thread Tools | Search this Thread |
Display Modes | |
|
|