kle4@quads.uchicago.edu (steven anton klenda) (05/29/91)
Perhaps a postscript literate person out there can answer this question. I need to print out a troff-generated table on a postscript printer in landscape mode, but neither the local troff-to-postscript facility (transcript/ptroff) nor lpr has a flag to do this; however, a tool to translate text files to postscipt and print them does exist on this system (enscript). After prolonged (and only marginally helpful) discussions, the U. Chicago user support students suggested that I find the postscript string in an enscripted file which tells the printer to print in landscape mode and incorporate this into my postcript file before I print it. After I translated my troff file to postscript, I located the postscript string which is used at the beginning of each page. This is a command, BP defined as: /BP{save/catsv exch def 0 792 translate 72 432 div dup neg scale xo yo translate 0 0 moveto}def Since the enscript facility put its landscape command after its new page command, I thought a quick change to the BP definition would do the trick, so I located the postcript string which put the printer in landscape mode in an enscripted file and inserted it in various places in the BP definition. The enscript landscape string was /Landscape{90 rotate 0 -15840 translate}def When combined with BP this gave me definitions like /BP{save/catsv exch def 0 792 translate 72 432 div dup neg scale xo yo translate 0 0 90 rotate 0 -15840 translate moveto}def to experiment with. I tried several variations, even without parts of the Landscape command, but all gave me blank pages for output. Without knowing postscript, this is as far as logic could take me. Any suggested solutions? Using a package other than troff is at this stage not an option. Many advance thanks. -Steve ------------------------------------------------------------------------------- Steven A. Klenda kle4@midway.uchicago.edu -- ------------------------------------------------------------------------------- Steven A. Klenda kle4@midway.uchicago.edu