Bill McCarthy Posted November 10, 2008 Share Posted November 10, 2008 When I specify a variable field in a text box that contains more characters than will fit in the box, nothing prints. I have selected "discard text that does not fit" but it discards everything, even the text that fits. When I select "overflow text to new pages" it similarly overflows the entire text, not just the text that doesn't fit. Is there a way to remedy this? Link to comment Share on other sites More sharing options...
Admin1676454018 Posted November 10, 2008 Share Posted November 10, 2008 Bill, can you tell us which version of FusionPro you are using, Mac/PC, etc? Also, what happens if you select "Adjust text to fit"? Thanks Link to comment Share on other sites More sharing options...
Alex Marshall Posted November 10, 2008 Share Posted November 10, 2008 Hello, Is the text pulled in from a field in your data file? If so, try this option. I'll try my best to answer your questions and walk you through the steps quickly. Below are the steps to take in Fusion Pro to create a formatted text resource and then insert it into your rule. 1) Go to the following menu options in at the top of your tool bar in fusion pro (FusionPro - Palettes - Steps) 2) When the "Steps" palette opens hit the second button down "Create Resources". This will open the resource dialog box. 3) Name your resource something you can recognize. In the "Type" drop down menu choose "Formatted Text". Hit the "Edit Button". 4) This will open a window that looks and works exactly as the variable text frame editor so that you can add and format you paragraph along with the variable. Once this is completed save and close out of all of these windows. You have created a formatted text paragraph. 5) In the "Steps" palette go to the "Create Rule" option and create the rule as you normally would. To insert the formatted text resource open your "Building Blocks" and click on the tab at the top that says "Resource". Your new formatted text resource should be listed here the way that you named it and you can insert it exactly as you would insert a variable field. 6) Then insert your rule into your variable text frame. Remember that your rule will contain your paragraph. Link to comment Share on other sites More sharing options...
Bill McCarthy Posted November 10, 2008 Author Share Posted November 10, 2008 I'm using Version 5.1p1d on Windows. The problem is that there are too many words in the paragraph. When it doesn't fit, it prints nothing. I want it to print what fits and truncate the rest. Since it is only one paragraph, that doesn't seem to work. Link to comment Share on other sites More sharing options...
Alex Marshall Posted November 11, 2008 Share Posted November 11, 2008 If you want to fit text to a single line, you can just use the CopyfitLine function. If you want to fit to a different number of lines, you will need to roll your own copyfit logic using the FusionProTextMeasure object. Basically, most copyfitting involves iterations of measuring some text, then modifying its size and measuring again, until it fits. The <magnify> tag can be very helpful in this regard. Here's a function that should work: function CopyfitToLines(text, widthInPoints, numLines, magnifyType) { var MagnifyType = magnifyType || "text"; var NumLines = Int(numLines) || 1; var tm = new FusionProTextMeasure; tm.maxWidth = widthInPoints*100; var retcode = 0; var factor = 100; var tags = text; for (var factor = 100; factor >= 10; factor--) { if (factor != 100) tags = "<magnify type=" + MagnifyType + " factor=" + factor + ">" + text + "</magnify>"; retcode = tm.CalculateTextExtent(tags); if (tm.messages) ReportError("CopyfitLines: " + tm.messages); if (retcode != 0) break; if (tm.textLines <= NumLines) return tags; } ReportWarning("CopyfitLines failed to fit the text"); return text; } The last two parameters are optional. Note that the font name, point size, and anything else affecting the measurement must be specified in the tags. Here's an example of calling it: var text = "<f name=Arial><z newsize=36>" + Field("FName") + " " + Field("Lname") + " of " + Field("City") + ", " + Field("State"); return CopyfitToLines(text, 200, 2); Link to comment Share on other sites More sharing options...
Dan Korn Posted November 12, 2008 Share Posted November 12, 2008 It's hard to say what you need to change without looking at the job, since there are a lot of things that affect how text is kept together. I would start by taking a look at the "Widows" and "Keep with next paragraph" settings in the Paragraph Formatting dialog. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.