please dont rip this site

PCL5 Word Wrap

The word-wrap provided by ^[&s0C is really a character wrap as you know. Note: I'm going to use ^[ to represent the escape character here.

The only idea I have ever had to do a real word wrap is to define each word in a macro then play back the macros: forward invisible, then backwards invisible, then forwards visible. e.g. "Happy daze" would become

^[&fyXHappy ^[&f1X^[*vo1T^[&f2X^[&a180P^[&f2X^[*v1oT^[&a0P^[&f2X^[&fyXdaze ^[&f1X^[*vo1T^[&f2X^[&a180P^[&f2X^[*v1oT^[&a0P^[&f2X

You could compress that a bit by having a macro that did the play back:

^[&f1yX^[*vo1T^[&fy2X^[&a180P^[&f2X^[*v1oT^[&a0P^[&f2X^[&f1X

Then the text would be:

^[&fyXHappy ^[&f1x1y2X^[&fyXdaze ^[&f1x1y2X

The only advantage of this is that it doesn't matter what font size you print in. The printer will automatically wrap the text for you between the left and right margins. If you know how wide each character will be in advance (i.e. you know the font, and the width table for each letter in your string) then it would be much better to just insert a carriage return and line feed at the appropriate place.

Comments:

See also:


file: /Techref/language/pcl/wordwrap.htm, 2KB, , updated: 2010/2/16 10:17, local time: 2024/11/8 19:57,
TOP NEW HELP FIND: 
3.16.203.55:LOG IN
©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.org/Techref/language/pcl/wordwrap.htm"> PCL5&nbsp;Word Wrap</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 
Quick, Easy and CHEAP! RCL-1 RS232 Level Converter in a DB9 backshell
Ashley Roll has put together a really nice little unit here. Leave off the MAX232 and keep these handy for the few times you need true RS232!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .