SPLIT A LONG STRING TO PUT IN A MULTILINE BOX 
Author Message
 SPLIT A LONG STRING TO PUT IN A MULTILINE BOX

Hi,
I have a long string, and I want to print in a box (a field whih
multiline) whith a length smaller than the string length.

To print I select some font

/Helvetica findfont 12 scalefont setfont
cx cy moveto
( my_string_part_one )show
cy Dy add cy
cx cy moveto
( my_string_part_two )show
....

Anyone know a solution to do this in  automatic  ?

Thanks,

Fabio.



Fri, 11 May 2001 03:00:00 GMT  
 SPLIT A LONG STRING TO PUT IN A MULTILINE BOX
Quote:

> Hi,
> I have a long string, and I want to print in a box (a field whih
> multiline) whith a length smaller than the string length.

> To print I select some font

> /Helvetica findfont 12 scalefont setfont
> cx cy moveto
> ( my_string_part_one )show
> cy Dy add cy
> cx cy moveto
> ( my_string_part_two )show
> ....

> Anyone know a solution to do this in  automatic  ?

> Thanks,

> Fabio.

You could use something like
 my_proc (my_sting ...) kshow
where
/my_proc
 {pop pop currentpoint exch pop dup my_margin ge{cx exch DY add
moveto}{pop}ifelse}
bind def

This brute force approach does no fancy things like hyphenation,
however.

Helge
--





Fri, 11 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. SPLIT A LONG STRING

2. how to split a split string

3. Can I create a multiline text entry box?

4. Putting a box around each page of a PS file

5. Putting a TeX box in a function and recalling it several times

6. How to put a string as footer in a ps file

7. How to put very large strings on the stack

8. how to put * in a string

9. Put quotation marks in a String with VBScript?

10. Out put string to database

11. putting a " in string

12. Split string by regular expression (ie. date)

 

 
Powered by phpBB® Forum Software