These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#41989 - 01/21/13 05:36 AM advanced expressions for text (copy fitting)
prexpresso Offline
OL Newbie

Registered: 01/10/12
Posts: 4
Loc: denmark
When we run jobs with company names etc.
I would like an expression/variable for a text box, that will meet my challenge:

When eg.
"Supersonic Company Name Ltd." is typed in text box,
it must NOT break at "Ltd.", then the word before must be added before the break.

Example shown:

Not good: "Supersonic Company Name
Good: "Supersonic Company
Name Ltd."

If i could add this to all my "standard company" text boxes, this would make me happy, and make it easier to main stream this operation.

#41995 - 01/21/13 03:16 PM Re: advanced expressions for text (copy fitting) [Re: prexpresso]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal

This will be difficult, since you can only control how the words are wrapped in some limited ways.

I have two suggestions that you can try(they aren't perfect, but pretty much as close as you will get):

- Enable Copy Fitting in the object's properties, and give it a small minimum font size. This way, if the name becomes too long, it will reduce the font size, and so it will never wrap at all, thus eliminating the problem.

- You could make two text boxes on top of each others. Each of the text box would use a different variable to display the data. One box would have a greater width than the other. The idea is to put an IF statement in those variables, and if the name of the company goes beyond a certain length, you display the variable in the SMALL box, to ensure it will wrap toward the middle of the company's name.

Here's an example of the expressions you could use in each of the variables:



In this example, if the company name is 15 characters or less, it will display it in the large box. If it's greater than 15 characters, it will display it in the small box, which will wrap more words on the second line. Of course, feel free to adjust the number of characters, and the width of the two boxes to suit your needs.

Feel free to experiment with these two methods, though as I've said, there is only a limited number of ways that you can affect word wrapping, so the options are unfortunately a bit limited.

Raphaël Lalonde-Lefebvre

#42164 - 02/04/13 11:50 AM Re: advanced expressions for text (copy fitting) [Re: prexpresso]
Arch1 Offline
OL Expert

Registered: 02/15/11
Posts: 216
Loc: michigan
Where exactly is the copy fitting setting? I have a similar problem.
Dan Lixie

#42166 - 02/04/13 11:53 AM Re: advanced expressions for text (copy fitting) [Re: prexpresso]
Olivier J

In the properties window. Simply highlight the object, then look at the properties window. It's about halfway down the list of properties if I remember right.

Edited by Olivier J (02/04/13 12:52 PM)