marcuslayton Posted October 6, 2010 Share Posted October 6, 2010 Where is the location that describes copyfitline - looked in the manual and didn't seem to find any api like description of it. I have a text box that would require some individual copyfitting, and i have used it ages ago and don't know what the requirments of the function are. Looked at the new post for a better copyfit line - but that set the width where i need it to do a text copyfit. thanks! Quote Link to comment Share on other sites More sharing options...
marcuslayton Posted October 6, 2010 Author Share Posted October 6, 2010 from what it looks like: return CopyfitLine("", Field("Name"), "Adobe Garamond Pro", 20, 137, 6, false); looks like something, field, font, what size supposed to be, width in points, minimum, and if it to be enlarged or not Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted October 7, 2010 Share Posted October 7, 2010 (edited) Where is the location that describes copyfitline - looked in the manual and didn't seem to find any api like description of it. Sorry, this seems to be a documentation oversight. The parameters to CopyfitLine, in order, are: staticPart - text to not be resizeddynamicPart - text to be resized (after staticPart)font - font family namesize - base point size (in points)width - width of the frame or column (in points)minimum - minimum point size (in points)adjustWidthOnly - true/false (optional - see below) For the "adjustWidthOnly" parameter, if you leave it off (or specify false), the function will adjust the point size, that is, both the width and height, of the glyphs. If you specify true, the function will adjust only the set width of the glyphs, but not the height, which basically means they will look squished horizontally. In FusionPro 6.0 and newer, you can use the FindTextFrame and GetSettableTextWidth functions to automatically get the frame width instead of hard-coding it. Looked at the new post for a better copyfit line You mean this? http://forums.printable.com/showthread.php?p=190#post190 - but that set the width where i need it to do a text copyfit. thanks! I'm not sure what you mean. Both functions are doing the exact same "text" kind of copyfitting by default (unless you specify true for the last optional parameter to CopyfitLine). from what it looks like: return CopyfitLine("", Field("Name"), "Adobe Garamond Pro", 20, 137, 6, false); looks like something, field, font, what size supposed to be, width in points, minimum, and if it to be enlarged or not You're close. The first parameter ("") is the static part not to be resized; it's perfectly valid (and common) to specify an empty string here to resize the entire line. The last parameter (false) means that it should to a regular "text" copyfit; that can be left off and you'll get the same result. Edited January 5, 2015 by Dan Korn width is in points, not hundredths of points Quote Link to comment Share on other sites More sharing options...
marcuslayton Posted October 7, 2010 Author Share Posted October 7, 2010 excellent - txs dan - the rule is working great! Quote Link to comment Share on other sites More sharing options...
Developer Posted January 2, 2015 Share Posted January 2, 2015 The parameters to CopyfitLine, in order, are: staticPart - text to not be resized dynamicPart - text to be resized (after staticPart) font - font family name size - base point size (in points) width - width of the frame or column (in hundredths of points) minimum - minimum point size (in points) adjustWidthOnly - true/false (optional - see below) I did some testing, and it appears in FusionPro 8.2.7 the width parameter of the CopyfitLine function should be in points, not hundredths of points. Here is an example using the FindTextFrame and GetSettableTextWidth functions that Dan suggested. The GetSettableTextWidth function returns the width in hundredths of points, so I divided by 100 to get points. I also included a span tag to keep any text following this line at its normal size. Make sure to have "Re-evaluate this rule for every text flow" and "Treat returned strings as tagged text" in the rule editor checked. myWidth = GetSettableTextWidth(FindTextFrame(FusionPro.Composition.CurrentFlow.name)) / 100; return "<span accumulate=false>" + CopyfitLine("",Field("Email") + "@mycompany.com","Arial","7",myWidth,"1",false) + "</span>"; Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted January 5, 2015 Share Posted January 5, 2015 I did some testing, and it appears in FusionPro 8.2.7 the width parameter of the CopyfitLine function should be in points, not hundredths of points. Yes, that's correct. I've edited my post above to note that the width parameter is in points, not in hundredths of points. Thanks for the catch. Quote Link to comment Share on other sites More sharing options...
ThePorge Posted May 26, 2015 Share Posted May 26, 2015 Got a prob. I'm using the return CopyfitLine("", Field("Name"), "Adobe Garamond Pro", 11, 214, 6, true); It is used in a text resource that I made because the copy changes based on the data file. This copy also has an image (a signature) that moves with the copy. The problem is when the copy gets shrunk to fit the sig disappears. Otherwise this sig appears as it should. Any ideas? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 26, 2015 Share Posted May 26, 2015 Got a prob. I'm using the return CopyfitLine("", Field("Name"), "Adobe Garamond Pro", 11, 214, 6, true); It is used in a text resource that I made because the copy changes based on the data file. This copy also has an image (a signature) that moves with the copy. The problem is when the copy gets shrunk to fit the sig disappears. Otherwise this sig appears as it should. Any ideas? Please start a new thread with your specific question. Include the versions of FusionPro, Acrobat, and the operating system. If you can attach a minimal sample job which demonstrates the problem, that would be ideal. Quote Link to comment Share on other sites More sharing options...
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.