Jump to content

Copyfitline error


Recommended Posts


very new to this but going through forums to find what i need.

We have an field that we need to us copyfitline with and from the forums we have come up with

return CopyfitLine("", Field("Email"),"", 10, 50, 6,false);

but we get an error when validating it

error is "uncaught exception: error in function CopyFitLine: false"


any assistance would be greatly appreciated


Link to comment
Share on other sites

What are the specific versions of FusionPro, Acrobat, and your operating system? Also, do you get the same error in the log (.msg) file when you compose that you get when you click Validate in the Rule Editor?


Anyway, I think the problem is that you're not specifying the font in the third parameter. Also, the fifth parameter, the frame width, is in points, where there are 72 points in an inch, so 50 is about two-thirds of an inch, which is probably way smaller than what you want. What happens if you do this instead?

return CopyfitLine("", Field("Email"), "Arial", 10, 500, 6, false);

If you're using FusionPro 8 or later, you can name the text frame that the rule is going into, and check the "Re-evaluate this rule for every text flow" box; then, instead of hard-coding the width, you can do this:

var myWidth = GetSettableTextWidth(FindTextFrame(FusionPro.Composition.CurrentFlow.name)) / 100;
return CopyfitLine("", Field("Email"), "Arial", 10, myWidth, 6, false);

Note that this last example won't work at rule validation time (in the Rule Editor), but it should work when you preview or compose.

Link to comment
Share on other sites

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.

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...