🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #6135

landscape mode string?

#6135
From: steven anton klenda
Date: Tue, 28 May 1991 21:13
62 lines
2651 bytes
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
Technical Details
Message-ID: <1991May28.211303.19750@midway.uchicago.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!swrinde!mips!pacbell.com!att!linac!midway!quads.uchicago.edu!kle4

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!swrinde!mips!pacbell.com!att!linac!midway!quads.uchicago.edu!kle4
From: kle4@quads.uchicago.edu (steven anton klenda)
Newsgroups: comp.lang.postscript
Subject: landscape mode string?
Keywords: postscript, troff, landscape
Message-ID: <1991May28.211303.19750@midway.uchicago.edu>
Date: 28 May 91 21:13:03 GMT
Sender: news@midway.uchicago.edu (NewsMistress)
Distribution: usa
Organization: University of Chicago
Lines: 62