Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP: Wordwrap within a PS-document

Status
Not open for further replies.

Petri

Programmer
Jul 31, 2000
6
SE
<br>I'm not so experienced PS-programmer and wonder<br>if there is a easy way of wrapping a text-string<br>within a defined &quot;text-box&quot;.<br><br>I want to insert a x character long string which<br>automatically cuts the string in pieces and <br>places them under eachother...<br><br>Can anybody give me some example on this matter?<br><br>Thank you in advance,<br>/Petri
 
Hi,
the procedure is not easy but is work a do this in a projet. When you want to show the string you calculate the string width with command stringwidth but make sure you set it up the font before bacause he need it. And when you have the width of your string you calculate if is enter in the space resigned to this string. If is not enter on this you just start at the beginning of the string and and search the space one after one and calculate de width. When you sure the string enter on it you just show it and restart the processing with the rest of the string in the next line.

Eric Riendeau
Pirel inc.
Developpement [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top