IMPORTANT ANNOUNCEMENT

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
#56546 - 12/12/18 12:45 PM Word wrap question.
Yair Offline
OL Newbie

Registered: 12/16/13
Posts: 9
Loc: Oregon
Hello,
I'm trying to setup a text box with a variable text field (@full name@) followed by a non variable text line ("Savings offer") some of the names are over 60 characters long so I have to make the non variable text drop to a second line by adjusting the high and width of the text box unfortunately the names that are no as long are not allowing for a clean break in the non variable text, is there an appropriate expression to add a line break depending on the number of characters in that field?

Thank you for your help!

Top
#56559 - 12/13/18 05:42 PM Re: Word wrap question. [Re: Yair]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
By default, a Text box object does word wrap for you.

I am not sure I understand your problem. Once you have added your variable, its content and your static text will be look at and word wrapped if need be.
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top
#56560 - 12/13/18 06:55 PM Re: Word wrap question. [Re: Yair]
Yair Offline
OL Newbie

Registered: 12/16/13
Posts: 9
Loc: Oregon
Hi Jean,
This is my problem
Variable---> "First name last name" followed by non variable text "Savings offer". so it looks like this
"John Q Sample's Savings Offer"
But some times I get extra long names like:
"John Q Sample and Jane Doe Sample's Savings offer"
I can ply with the text box size to make the line break right after the variable so it looks like:
"John Q Sample and Jane Doe Sample's
Savings offer"
But sometimes the names can be a characters shorter or longer so I end up with the following result:
"John Q Sample and xxxxx Jane Doe Sample's Savings
Offer."
The client doesn't like to see the word "offer" in a line by it self so the question is if there is a way to make an expression that sates that if the name field is lets say 60 characters long to add a line break right after the name and have the non variable text (Savings offer) together in the line below?

I hope I explained my self, Thank you all for your help with this matter!

Top
#56563 - 12/14/18 01:09 PM Re: Word wrap question. [Re: Yair]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
You could right some PressTalk script to take care of this but I have an easier way.

The Text object will word wrap on spaces. It doesn't look at the actual character being displayed BUT its "code" value.

  • Set a new style only for the Saving's offer text.
  • Go in the Style properties and click on the 1/A like button next to the Encoding drop-down list.
  • In the Available glyphs list, the second one is a space character.
  • Drag and drop it over a character you will not use in your text for that specific style. Remember its decimal value. In my test, I used the font Helvetica and overwrote the (EURO) character, its decimal value being 128.
  • Back in your Text object, write your text. Once you are reading to add a space, instead, type in the character you overwrote. In my case, since I couldn't find the (EURO) character, I typed in the decimal value like this: ALT+0128(128 was the decimal value for the (EURO) character).
  • In your Text object editor, you will see the (EURO) character but once you close it, it will be replaced by a space.


Since Savin's Offer is now seen as a whole word, the word wrapping will not break it.

Hope that helps.

Forget all the above...didn't check that we were in the PrintShop Mail forum (went to fast), the answer is only valid for PlanetPress.


Edited by Jean-Cédric (12/14/18 01:58 PM)
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top
#56566 - 12/14/18 01:50 PM Re: Word wrap question. [Re: Jean-Cédric]
Yair Offline
OL Newbie

Registered: 12/16/13
Posts: 9
Loc: Oregon
Way to toy with my feeling man LOL.

Thank you for taking the time!

Top
#56567 - 12/14/18 02:02 PM Re: Word wrap question. [Re: Yair]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
So, my approach is still valid in PrintShop Mail wink

The Text object will word wrap on spaces. It doesn't look at the actual character being displayed BUT its "code" value.

It might be a little trickier to find the character needed but I did while using character 160 (it is not a letter and worked for me).

In your Text object, write your text. Once you are ready to add a space that you do not want to be broke over, instead, type in ALT+0128. For the rest of the static text, type in regular space.

Since Savin's Offer is now seen as a whole word, the word wrapping will not break it.

Hope that helps.
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top
#56568 - 12/14/18 04:31 PM Re: Word wrap question. [Re: Yair]
Yair Offline
OL Newbie

Registered: 12/16/13
Posts: 9
Loc: Oregon
Awesome thank you very much, that worked just right!
I used "ALT+255" for an invisible character instead

This is what I typed:
[Fullname]&"'s SavingsALT+255offer"

My result was:
John Q Sample and wife Jane Q Sample's
Savings Offer

Man I was really over complicating my self with this issue thanks again!

Best regards.
Yair.


Edited by Yair (12/14/18 04:32 PM)

Top