[comp.lang.postscript] Landscape printing under

brown@astroatc.UUCP (Vidiot) (06/19/89)

In article <81=g024X36Zp01@amdahl.uts.amdahl.com> dacwmk@uts.amdahl.com (William M. Kules) writes:
<
<Is landscape printing supported on troff/psdit driving a
<Post-Script printer?

No, troff width is 7.54 inches.  The troff output was designed for a C/A/T
phototypesetter, which is a vertical format printer only.  Since we don't have
our copy of ditroff yet, I don't know what it can do.
-- 
	        harvard\     att!nicmad\
Vidiot            ucbvax!uwvax..........!astroatc!brown
	        rutgers/  decvax!nicmad/
	ARPA/INTERNET: brown%astroatc.UUCP@spool.cs.wisc.edu

malloy@nprdc.arpa (Sean Malloy) (06/19/89)

In article <2093@astroatc.UUCP> brown@astroatc.UUCP (Vidiot) writes:
>In article <81=g024X36Zp01@amdahl.uts.amdahl.com> dacwmk@uts.amdahl.com (William M. Kules) writes:
><
><Is landscape printing supported on troff/psdit driving a
><Post-Script printer?
>
>No, troff width is 7.54 inches.  The troff output was designed for a C/A/T
>phototypesetter, which is a vertical format printer only.  Since we don't have
>our copy of ditroff yet, I don't know what it can do.

We have been using ditroff/psdit to generate landscape output for
PostScript printers for several years now; we have a shell script
called 'psroff' that was part of the package we got from Adobe that
handles farming out the flags to the various subprograms. The '-L'
(output is landscape mode) flag in psroff does nothing to tell
ditroff that the page layout has changed (the information is passed
only to psdit) -- you have to change the page length and line length
manually.

Also, you will get the error message 'po + ll greater than 7.54 inches',
which you can ignore, since it's really a warning message.


 Sean Malloy					| "The proton absorbs a photon
 Navy Personnel Research & Development Center	| and emits two morons, a
 San Diego, CA 92152-6800			| lepton, a boson, and a
 malloy@nprdc.navy.mil				| boson's mate. Why did I ever
						| take high-energy physics?"

brown@astroatc.UUCP (Vidiot) (06/19/89)

In article <2518@skinner.nprdc.arpa> malloy@nprdc.arpa (Sean Malloy) writes:
<
<We have been using ditroff/psdit to generate landscape output for
<PostScript printers for several years now; we have a shell script
<called 'psroff' that was part of the package we got from Adobe that
<handles farming out the flags to the various subprograms. The '-L'
<(output is landscape mode) flag in psroff does nothing to tell
<ditroff that the page layout has changed (the information is passed
<only to psdit) -- you have to change the page length and line length
<manually.

Great, when we finally get our ditroff I will be trying out the landscape mode.
-- 
	        harvard\     att!nicmad\
Vidiot            ucbvax!uwvax..........!astroatc!brown
	        rutgers/  decvax!nicmad/
	ARPA/INTERNET: brown%astroatc.UUCP@spool.cs.wisc.edu

brown@astroatc.UUCP (Vidiot) (06/20/89)

In article <2518@skinner.nprdc.arpa> malloy@nprdc.arpa (Sean Malloy) writes:
<
<We have been using ditroff/psdit to generate landscape output for
<PostScript printers for several years now; we have a shell script
<called 'psroff' that was part of the package we got from Adobe that
<handles farming out the flags to the various subprograms. The '-L'
<(output is landscape mode) flag in psroff does nothing to tell
<ditroff that the page layout has changed (the information is passed
<only to psdit) -- you have to change the page length and line length
<manually.

I just looked at my copy of the Adobe Transcript manual and the psroff
command doesn't show a -L option.  Where did you learn about that option,
other than looking at the script itself?
-- 
	        harvard\     att!nicmad\
Vidiot            ucbvax!uwvax..........!astroatc!brown
	        rutgers/  decvax!nicmad/
	ARPA/INTERNET: brown%astroatc.UUCP@spool.cs.wisc.edu

malloy@nprdc.arpa (Sean Malloy) (06/20/89)

In article <2099@astroatc.UUCP> brown@astroatc.UUCP (Vidiot) writes:
>In article <2518@skinner.nprdc.arpa> malloy@nprdc.arpa (Sean Malloy) writes:

><We have been using ditroff/psdit to generate landscape output for
><PostScript printers for several years now; we have a shell script

>I just looked at my copy of the Adobe Transcript manual and the psroff
>command doesn't show a -L option.  Where did you learn about that option,
>other than looking at the script itself?

The man page we have for psroff lists the -L flag; I don't know why
yours wouldn't:

PSROFF(1)                 USER COMMANDS                 PSROFF(1)

NAME
     psroff - ditroff to a POSTSCRIPT printer

SYNOPSIS
     psroff [ -tLM ] [ troff options ] [ spool options ] [  files
     ]

DESCRIPTION
     psroff is a  shell  script  that  runs  [di]troff(1)  in  an
     environment  to  produce output on a POSTSCRIPT printer.  It
     uses  psdit  to  convert  ditroff  intermediate  output   to
     POSTSCRIPT format, and spools this for printing. If no files
     are specified, the standard input is used.

     In addition to the standard ditroff options,  the  following
     options are understood by psroff.

     -t   sends the POSTSCRIPT output  to  the  standard  output,
          rather  than  spooling it to a printer.  Note that this
          overrides the meaning of the ditroff -t option; if  you
          want that, run ditroff directly.

     -L   rotate the output 90 degrees (landscape mode).

     -M   sets the printer in manual paper feed mode.



--------------------------------------------------------------------------------
 Sean Malloy					| "The proton absorbs a photon
 Navy Personnel Research & Development Center	| and emits two morons, a
 San Diego, CA 92152-6800			| lepton, a boson, and a
 malloy@nprdc.navy.mil				| boson's mate. Why did I ever
						| take high-energy physics?"

brown@astroatc.UUCP (Vidiot) (06/21/89)

In article <2538@skinner.nprdc.arpa> malloy@nprdc.arpa (Sean Malloy) writes:
<In article <2099@astroatc.UUCP> brown@astroatc.UUCP (Vidiot) writes:
<>In article <2518@skinner.nprdc.arpa> malloy@nprdc.arpa (Sean Malloy) writes:
<
<><We have been using ditroff/psdit to generate landscape output for
<><PostScript printers for several years now; we have a shell script
<
<>I just looked at my copy of the Adobe Transcript manual and the psroff
<>command doesn't show a -L option.  Where did you learn about that option,
<>other than looking at the script itself?
<
<The man page we have for psroff lists the -L flag; I don't know why
<yours wouldn't:

[... man page deleted ...]

Maybe Adobe can answer why the latest (?) version on Transcript that I
received at my old job (end of March), version 2.1, has a manual that is
notated as Sun Release 3.2 - Last change: 14 July 1987, when we bought
the stuff for the Vax 11/750, 4.3BSD.

The psroff section has no mention of the -L or -M options.  Here at my
new job, the online manual has the same problem, as it is exactly the
same software release.

Explanation would be appreciated.
-- 
	        harvard\     att!nicmad\
Vidiot            ucbvax!uwvax..........!astroatc!brown
	        rutgers/  decvax!nicmad/
	ARPA/INTERNET: brown%astroatc.UUCP@spool.cs.wisc.edu

malloy@nprdc.arpa (Sean Malloy) (06/22/89)

In article <2115@astroatc.UUCP> brown@astroatc.UUCP (Vidiot) writes:
>The psroff section has no mention of the -L or -M options.  Here at my
>new job, the online manual has the same problem, as it is exactly the
>same software release.

>Explanation would be appreciated.

In the lib/psdit.pro file on our system, we have two procedures
defined: xi and xiL. The -L flag passed to psdit determines whether xi
or xiL is called immediately before the '%%EndProlog' line.

The definition for xi is:

/xi {0 72 11 mul translate 72 resolution div dup neg scale 0 0 moveto
  /fontnum 1 def /fontsize 10 def /fontheight 10 def /fontslant 0 def F
  /pagesave save def}def

The definition for xiL is:

/xiL {0 72 8.25 mul 72 11 mul translate -90 rotate
  72 resolution div dup neg scale 0 0 moveto
  /fontnum 1 def /fontsize 10 def /fontheight 10 def /fontslant 0 def F
  /pagesave save def}def

The changes to psdit.c are logged as being made 87/10/13, after the
changes required to add support for psfig (added 87/9/29). Basically,
the change involved adding the check for the -L flag in main(),
setting a variable according to whether it was found, and in t_init()
changing the normal "x i" initialization to "xi" or "xiL" depending on
the state of the variable.


 Sean Malloy					| "The proton absorbs a photon
 Navy Personnel Research & Development Center	| and emits two morons, a
 San Diego, CA 92152-6800			| lepton, a boson, and a
 malloy@nprdc.navy.mil				| boson's mate. Why did I ever
						| take high-energy physics?"

brown@astroatc.UUCP (Vidiot) (06/22/89)

In article <2590@skinner.nprdc.arpa> malloy@nprdc.arpa (Sean Malloy) writes:
<In article <2115@astroatc.UUCP> brown@astroatc.UUCP (Vidiot) writes:
<>The psroff section has no mention of the -L or -M options.  Here at my
<>new job, the online manual has the same problem, as it is exactly the
<>same software release.
<
<>Explanation would be appreciated.
<
<In the lib/psdit.pro file on our system, we have two procedures
<defined: xi and xiL. The -L flag passed to psdit determines whether xi
<or xiL is called immediately before the '%%EndProlog' line.
<
<The definition for xi is:
<
<[... deleted ...]
<
<The changes to psdit.c are logged as being made 87/10/13, after the
<changes required to add support for psfig (added 87/9/29). Basically,
<the change involved adding the check for the -L flag in main(),
<setting a variable according to whether it was found, and in t_init()
<changing the normal "x i" initialization to "xi" or "xiL" depending on
<the state of the variable.

This still doesn't explain why what we purchased from Adobe doesn't have
any of this.  One, at this point in time, we don't have the source.  We
are binary only.  Two, how do users get the code with the Landscape option?
-- 
	        harvard\     att!nicmad\
Vidiot            ucbvax!uwvax..........!astroatc!brown
	        rutgers/  decvax!nicmad/
	ARPA/INTERNET: brown%astroatc.UUCP@spool.cs.wisc.edu

hess@iuvax.cs.indiana.edu (Caleb Hess) (06/22/89)

In article <2590@skinner.nprdc.arpa> malloy@nprdc.arpa (Sean Malloy) writes:
>In article <2115@astroatc.UUCP> brown@astroatc.UUCP (Vidiot) writes:
>>The psroff section has no mention of the -L or -M options.  Here at my
>
>In the lib/psdit.pro file on our system, we have two procedures
>defined: xi and xiL. The -L flag passed to psdit determines whether xi
>
>The changes to psdit.c are logged as being made 87/10/13, after the
>changes required to add support for psfig (added 87/9/29). 

I just checked our new (TranScript 2.1) psdit.c.  It claims to be 
Revision 2.2 87/11/17, with Revision 2.1.1.8 87/07/08 and Revision 2.1.1.9
87/11/12.  There is no mention of psfig, and a revision on 87/10/13 should
have appeared between 2.1.1.8 and 2.1.1.9.  

We would find both psfig support and landscape mode useful (and while we're
at it, a legal-size paper option, although I've already hacked that in).

I think it's time for a word from Adobe (are you there, Glenn Reid?).

malloy@nprdc.arpa (Sean Malloy) (06/23/89)

In article <22501@iuvax.cs.indiana.edu> hess@iuvax.cs.indiana.edu (Caleb Hess) writes:
>I just checked our new (TranScript 2.1) psdit.c.  It claims to be 
>Revision 2.2 87/11/17, with Revision 2.1.1.8 87/07/08 and Revision 2.1.1.9
>87/11/12.  There is no mention of psfig, and a revision on 87/10/13 should
>have appeared between 2.1.1.8 and 2.1.1.9.  
>
>We would find both psfig support and landscape mode useful (and while we're
>at it, a legal-size paper option, although I've already hacked that in).

Psfig was developed by Ned Batchelder and Trevor Darrel at the
University of Pennsylvania's Computer and Information Science
department. The documentation lists the author's current address as
DEC in Maynard, Massachusetts, and states that inquiries may be
addressed to trevor@linc.cis.upenn.edu, and that psfig will be
available as part of future releases of Transcript from Adobe as well
as through uucp/ftp distribution.

The README file in /usr/local/src/psfig states:

   All source code, documentation and related files are Copyright (C) 1987
   by Trevor Darrell. All rights reserved. This software may not be distributed
   on a for-profit basis in any way without express written permission of the
   author(s).

Installing psfig requires ditroff, the source to psdit, and
(optionally) source to ditroff. However, if Adobe is distributing it,
the patched psdit should be available directly.


 Sean Malloy					| "The proton absorbs a photon
 Navy Personnel Research & Development Center	| and emits two morons, a
 San Diego, CA 92152-6800			| lepton, a boson, and a
 malloy@nprdc.navy.mil				| boson's mate. Why did I ever
						| take high-energy physics?"

greid@adobe.com (Glenn Reid) (06/23/89)

In article <2115@astroatc.UUCP> brown@astroatc.UUCP (Vidiot) writes:
>Maybe Adobe can answer why the latest (?) version on Transcript that I
>received at my old job (end of March), version 2.1, has a manual that is
>notated as Sun Release 3.2 - Last change: 14 July 1987, when we bought
>the stuff for the Vax 11/750, 4.3BSD.
>
>The psroff section has no mention of the -L or -M options.  Here at my
>new job, the online manual has the same problem, as it is exactly the
>same software release.
>
>Explanation would be appreciated.

Here's my understanding of the situation:

Adobe developed and sells TranScript.  Adobe also lets other people
re-sell TranScript through an OEM agreement.  One of these vendors is
Sun Microsystems, who therefore also sells TranScript.

Sun has added to the basic TranScript package in a couple of places.
For example, I believe they offer a filter to convert Sun raster files
to PostScript (I think it used to be called "pssun", but I'm probably
mistaken about that).

I believe that the -L switch for the psroff program was also an
extension made by Sun, and it is therefore only available from them.  I
believe it is on our list of future enhancements, but the currently
shipping version of TranScript from Adobe does not support it.

Therefore, if you bought TranScript from Sun, you would see the -L
switch in your man page, but if you bought it from Adobe, you may
not.

This may not be an accurate history in every detail, but it is
basically the situation.  I hope this helps clarify things a bit.

Glenn Reid
Adobe Sytems

dacwmk@uts.amdahl.com (William M. Kules) (07/22/89)

Is landscape printing supported on troff/psdit driving a
Post-Script printer?

-- 
Bill Kules    {ames,apple,sun,uunet,...}!amdahl!dacwmk     (408) 746-6016
    "We're on the road and we're gunning for the Buddha" -- Shriekback

malloy@nprdc.arpa (Sean Malloy) (08/02/89)

In article <81=g024X36Zp01@amdahl.uts.amdahl.com> dacwmk@uts.amdahl.com (William M. Kules) writes:
>Is landscape printing supported on troff/psdit driving a
>Post-Script printer?

We have been using ditroff and psdit to generate landscape output for
well over a year now, and there are only four things you need to do to
get it:

1. If you have the TranScript package from Adobe, you will have a
'psroff' shell script that takes a '-L' flag for landscape mode. If
not, you will need to give psdit the '-L' flag (the psroff script
handles this internally).

2. In your troff document, set the page length to 8.5i and the line
length to whatever gives you even margins with your page offset (a
line length of 9i is about right).

3. Get used to seeing the message "po + ll greater than 7.54i" while
ditroff is running.



 Sean Malloy					| "The proton absorbs a photon
 Navy Personnel Research & Development Center	| and emits two morons, a
 San Diego, CA 92152-6800			| lepton, a boson, and a
 malloy@nprdc.navy.mil				| boson's mate. Why did I ever
						| take high-energy physics?"

davy@riacs.edu (Dave Curry) (08/02/89)

In article <81=g024X36Zp01@amdahl.uts.amdahl.com> dacwmk@uts.amdahl.com (William M. Kules) writes:
>
>Is landscape printing supported on troff/psdit driving a
>Post-Script printer?
>

As it happens, I needed to do this on Monday.  I sent a note off to the
troff guru where I used to work (whose name I won't give out, to protect
the innocent), and he sent me the following instructions:

-----
  We took the standard psdit prologue (/usr/lib/ps/psdit.pro) and created
  a landscape version named /usr/lib/ps/land.pro by changing the line:

  /xi {0 72 11 mul translate 72 resolution div dup neg scale 0 0 moveto

  to:

  /xi {90 rotate 72 resolution div dup neg scale 0 0 moveto

  The land.pro prologue is accessed by "psdit -p/land.pro".
------

The above-mentioned line is line number 8 in our psdit.pro file; your
milage may vary.

Note that you have to adjust your line length, page offset, header and
footer margins to understand the rotated page; as near as I can tell
there is no way to change troff's idea that a page is 11 inches long.
For the -ms macros, I use something like:

	.nr LL 10i
	.nr PO .5i
	.nr HM .5i
	.nr FM 3i
	.ll 10i
	.po .5i

Which gives half-inch margins all around.  Works great!

Dave Curry
davy@riacs.edu

brown@astroatc.UUCP (Vidiot) (08/03/89)

In article <3085@skinner.nprdc.arpa> malloy@nprdc.arpa (Sean Malloy) writes:
<In article <81=g024X36Zp01@amdahl.uts.amdahl.com> dacwmk@uts.amdahl.com (William M. Kules) writes:
<>Is landscape printing supported on troff/psdit driving a
<>Post-Script printer?
<
<We have been using ditroff and psdit to generate landscape output for
<well over a year now, and there are only four things you need to do to
<get it:

[... description deleted ...]

Unfortunately, Adobe officially doesn't support landscape in their version.
Sun ported a version and added the -L option.  I was told by Adobe that they
are thinking of adding it to a later version.  We are getting Adobe source
and will be modifying it with information that I received from another net
person.

When someone else also posted a message like you did, I went digging through
our manuals and the script files.  Nowhere was the -L option supported.
So I asked Adobe and got the answer I gave above.
-- 
	        harvard\     att!nicmad\
Vidiot            ucbvax!uwvax..........!astroatc!brown
	        rutgers/  decvax!nicmad/
	ARPA/INTERNET: brown%astroatc.UUCP@spool.cs.wisc.edu

malloy@nprdc.arpa (Sean Malloy) (08/03/89)

In article <2502@astroatc.UUCP> brown@astroatc.UUCP (Vidiot) writes:
>Unfortunately, Adobe officially doesn't support landscape in their version.
>Sun ported a version and added the -L option.  I was told by Adobe that they
>are thinking of adding it to a later version.  We are getting Adobe source
>and will be modifying it with information that I received from another net
>person.
>
>When someone else also posted a message like you did, I went digging through
>our manuals and the script files.  Nowhere was the -L option supported.
>So I asked Adobe and got the answer I gave above.

Checking the psdit prolog, I find that the only change is to have a
second page setup call that rotates the page 90 degrees -- in the '/xi'
definition, it does an 11" translation along the Y axis, and in the
'/xiL' definition, which is called when landscape mode is selected, it
does an 8.5" translation in X, an 11" translation in Y, and a -90
rotation -- otherwise the functions are identical.

You should be able fairly trivially to make a new copy of the psdit
prolog and change '0 72 11 mul translate' to
'72 8.5 mul 72 11 mul translate -90 rotate', and use the -p flag to
psdit to make it read the modified prolog instead of the stock one.

Our psdit.pro file is in /usr/local/lib/lw/psdit.pro -- the man page
should say where it is.


 Sean Malloy					| "The proton absorbs a photon
 Navy Personnel Research & Development Center	| and emits two morons, a
 San Diego, CA 92152-6800			| lepton, a boson, and a
 malloy@nprdc.navy.mil				| boson's mate. Why did I ever
						| take high-energy physics?"