That is a laborious process in Postscript proper. The primitives are there to support it, but the real work is usually done by the application program that emits the postscript file. This makes sense, because the application knows how it wants it done, and there are a remarkable number of different ways to do it, when you take kerning and such into account.
The relevant primitves are (besides knowing the font metrics for the font you're using) are the 'width' and 'moveto' operators. You find out how wide a given string will be when printed, then add space until the size is just right, then emit the line. Usually an application will precompute all this, then just emit the 'moveto' and 'show' operators. All the operators I put in 'primes' have several variants. My advice: don't try to do it in Postscript unless you're really ready for a steep learning curve. You'd be a bit better off modifying enscript, especially if you're outputting a constant-width font like Courier. ++ kevin On Sat, May 18, 2002 at 05:44:38PM -0400, Joel Hammer wrote: > Does anyone know how to produce justified text in a postscript document? > It sounds simple, but there is no reference to this option in enscript, and > the two postscript manuals I downloaded from the internet don't have the > word "justify" in them. > Any insight appreciated, > Joel > > _______________________________________________ > Linux-users mailing list - http://linux-sxs.org/mailman/listinfo/linux-users > Subscribe/Unsubscribe info, Archives,and Digests are located at the above URL. -- Kevin O'Gorman (805) 650-6274 mailto:[EMAIL PROTECTED] Permanent e-mail forwarder: mailto:Kevin.O'[EMAIL PROTECTED] At school: mailto:[EMAIL PROTECTED] Web: http://www.cs.ucsb.edu/~kogorman/index.html Web: http://kosmanor.com/~kevin/index.html "Life is short; eat dessert first!" _______________________________________________ Linux-users mailing list - http://linux-sxs.org/mailman/listinfo/linux-users Subscribe/Unsubscribe info, Archives,and Digests are located at the above URL.