I am working on a project to create postscript from a data file, it's working ok for adding images and single-lines of text but I cannot work out how to make text wrap, is it possible?
Thanks for the reply, I'm very new to writing PostScript and after a lot of searching and trying things I cannot work out how to do it, could you point me in the right direction?
You'll have to write a procedure. That procedure will process a string. For each word in the string, you will use the "stringwidth" operator to measure the word. You will add the x-dimension of the string to your "currentpoint". You will compare that with your margin. If the word would exceed the margin, you'll use a "moveto" to reposition your currentpoint to the start of a new line.
PostScript interpreter doesn't have any access to kerning pairs. So the sophisticated formatting is not possible. Try to do the formatting on the host.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.