Search code examples
postscripteps

postscript: how to cut a string a certain width before show?


I need to print a string till a certain width for example:

(abcd efgh) show I need to print only 36 points of the string, in this case I want to print only abcd and half an e. how can I do this? or at least to print only till e or before e?


Solution

  • Set a clip. clip and rectclip will do the job. Remember to gsave and grestore because otherwise the clip will persist.