Jump to content

Copyfit single field

Recommended Posts

I've got a text frame that includes:






Some of the clients dont have an OfficePhone, while some dont have a Cellphone, so "Supress if Empty" is on. However, some of their email addresses are too long to fit on their business card. Is there a way to shrink the long emails to fit on one line, and leave the other two fields untouched?


Thank you!

Link to comment
Share on other sites

The CopyfitEmail() function works by identifying the @ character and copyfitting everything to the right. If you want to copyfit the entire line, use the CopyfitLine() function instead. It is used in a similar manner, although there are some added attributes.

The basic function reads:


CopyfitLine(staticpart, dynpart, font, size, width, minimum, justwidth)


• staticpart – written as a string, this declares the text that should remain static and not be copyfitted.

• dynpart – written as a string, this declares the text that should be copyfitted.

• font – this is the name of the typeface to be used when copyfitting.

• size – this is the size of the text that is not to be adjusted or fitted.

• width – this is the width of the frame, in points.

• minimum – this is the minimum font size, in points, that should be used when copyfitting.

• justwidth – expressed as a boolean (true or false), this tells FusionPro to stretch the text’s width (true) or leave the width as-is (false).


The rule would look like this:


return CopyfitLine( Field(“email”), “Arial”, 12, 300, 8, true);


Change the font name and frame width as appropriate.



Or you can write your own Copyfit logic using the FusionProTextMeasure object.

Edited by Alex Marshall
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...