[comp.sys.next] Postscript output resolution - again

rbp@investor.pgh.pa.us (Bob Peirce #305) (03/07/91)

I posted this once before but didn't get the response I needed.  I was
told that under 1.0 resolution out the serial port could be 150 dpi and
under 2.0 it can be 900 dpi.  However, nobody has been able to point me
to any reference where this is clearly stated.  Additionally, I am also
looking for a reference that will tell me how to set the output
resolution.  I have a 68030 cube with the complete 1.0 software release
and I will be upgrading to a 68040 with the complete 2.0 software
release.  I am looking for chapter numbers or keywords that will provide
this information.

Specifically, I am modifying Eric Scott's iwf program to drive an Epson
LQ-510 under 1.0.  The output resolution is about 60-80 dpi.  In looking
through the function calls, I have been unable to find any place where
this resolution is set.  If it is not set, why isn't it 150 dpi? 

It may be coincedence, but the bit pattern going to the filter works
correctly when my Epson is set for 8-pin printing with 1/8" line spacing
-- 64 scan lines per inch.  Horizontally, if I understand Eric
correctly, there are 2-bits/pixel, which determine four levels of grey. 
Eric assumes any grey is black, so the two bits are converted into a
black or a white pixel for printing.  This also works correctly when fed
to the filter modified for the way Epson fires its pins.

As a result, I have a program that works, but I do not understand why it
generates the specific resolution it does.  The output resolution is not
sufficient, but I don't know how to get more.

When I go to 2.0 I have the potential to get very good resolution but I
don't know what I will have to do to get it.  For that matter, I don't
even know what I will have to do to make this program work under 2.0. 
Certain threads in this group suggest it won't work at all. 

-- 
Bob Peirce, Pittsburgh, PA				  412-471-5320
...!uunet!pitt!investor!rbp			rbp@investor.pgh.pa.us

ddj@zardoz.club.cc.cmu.edu (Doug DeJulio) (03/08/91)

In article <1991Mar7.134221.4577@investor.pgh.pa.us> rbp@investor.pgh.pa.us (Bob Peirce #305) writes:
>I posted this once before but didn't get the response I needed.  I was
>told that under 1.0 resolution out the serial port could be 150 dpi and
>under 2.0 it can be 900 dpi.  However, nobody has been able to point me
>to any reference where this is clearly stated.

Okay, I've finally searched through the hardcopy documentation that
came with my Slab and found it.  It's in the
      Here's how to
         set up your computer
   and get up to speed.
book on page 54.

----------------------------------------------------------------------

NeXT Software License Agreement (Release 2.0)

6. PRINTING BITMAPS

You agree not to use the NeXT Softare to output bitmaps generated by
the PostScript interpreter included with the NeXT Software at a
resolution greater than 900 dots per inch.  You are free, however, to
transmit PostScript language files created with the NeXT Software to
an output device containing its own PostScript language interpreter
for output at any resolution.

----------------------------------------------------------------------

I find it interesting that it doesn't distinguish between NeXT output
devices and third party output devices.  Can somone post the
apropriate portion of the 1.0 license?
-- 
Doug DeJulio
ddj@zardoz.club.cc.cmu.edu

eps@toaster.SFSU.EDU (Eric P. Scott) (03/08/91)

In article <1991Mar7.134221.4577@investor.pgh.pa.us>
	rbp@investor.pgh.pa.us (Bob Peirce #305) writes:
>Specifically, I am modifying Eric Scott's iwf program to drive an Epson
>LQ-510 under 1.0.  The output resolution is about 60-80 dpi.  In looking
>through the function calls, I have been unable to find any place where
>this resolution is set.  If it is not set, why isn't it 150 dpi? 

iwf images to an off-screen window.  "By definition" that's 72dpi
(even though MegaPixel displays are 92dpi).

>                                          if I understand Eric
>correctly, there are 2-bits/pixel, which determine four levels of grey. 
>Eric assumes any grey is black, so the two bits are converted into a
>black or a white pixel for printing.

You missed a very subtle point... (iwscript fell into this pitfall)
Off-screen windows under 1.0 are always 2 bits deep.  If there was
some way to get 1-bit, PostScript would do all the hard work for me.
Fortunately, there's an easy way to do this: I use a linear
transfer function to map the whole range of gray values to the
range of the least significant bit:

BLACK		DKGRAY		LTGRAY		WHITE
|		|		|		|
0		1/3		2/3		1
	.	      .	     	    .		.
		.	   .	      .		.
			.	.	.	.
				LTGRAY		WHITE
				|		|
				2/3		1
"blacker than black"		black		white <-- on paper

If you look at the file iwwraps.psw you'll see some lines that
say "for debugging" that are commented out--if you build iwf with
those uncommented, you'll see exactly what's going on.

>As a result, I have a program that works, but I do not understand why it
>generates the specific resolution it does.  The output resolution is not
>sufficient, but I don't know how to get more.

The same way you "zoom in" on something--with a scale operator.
The only catch is that the hand-tuned bitmap fonts will no
longer be used (you're presumably doing an anamorphic scale?);
this will affect speed and the appearance of small type.

>When I go to 2.0 I have the potential to get very good resolution but I
>don't know what I will have to do to get it.  For that matter, I don't
>even know what I will have to do to make this program work under 2.0.
>Certain threads in this group suggest it won't work at all.

I still haven't investigated exactly WHY it doesn't work (I
suspect it's related to the variable resolution stuff that
"broke" lpr to non-NeXT printers in general).  In any case,
there are some nifty new features in 2.0 that (1) let me
render 1-bit deep with the correct PhotometricInterpretation
at a chosen resolution (2) provide more robust handling of
PostScript errors.  The program gets more complex, but also
more efficient since there's less data manipulation.

					-=EPS=-

eps@toaster.SFSU.EDU (Eric P. Scott) (03/09/91)

In article <12284@pt.cs.cmu.edu> ddj@zardoz.club.cc.cmu.edu
	(Doug DeJulio) writes:
>I find it interesting that it doesn't distinguish between NeXT output
>devices and third party output devices.  Can somone post the
>apropriate portion of the 1.0 license?

I think this is more or less the definitive history, in reverse
chronological order:
[NeRD-only versions, e.g. 0.981, omitted]


NeXT Software Upgrade License Agreement (Release 2.0):
[N5516 product]

5. PRINTING BITMAPS
Licensee agrees not to use NeXT Software Release 2.0 to output
bitmaps generated by the PostScript interpreter included with
NeXT Software Release 2.0 at a resolution greater than 900 dots
per inch.  Licensee is free, however, to transmit PostScript
language files created with NeXT Software Release 2.0 to an
output device containing its own PostScript language interpreter
for output at any resolution.


NeXT Software License Agreement (Release 2.0):
[NeXTstation and NeXTcube]

6. PRINTING BITMAPS
You agree not to use the NeXT Software to output bitmaps
generated by the PostScript interpreter included with the NeXT
Software at a resolution greater than 900 dots per inch.  You are
free, however, to transmit PostScript language files created with
the NeXT Software to an output device containing its own
PostScript language interpreter for output at any resolution.


1.0a (2/90): (identical to 1.0)


1.0 (11/89):

5. PRINTING
The NeXT Software is intended to be used to generate screen
displays with resolutions of less than 150 dots per inch on a
NeXT Computer and to print images with print resolutions of up to
600 dots per inch on a NeXT Printer.  You agree not to make use,
directly or indirectly, of the PostScript software included with
the NeXT Software to print bitmaps with print resolutions of 150
dots per inch or greater, or to generate fonts or typefaces,
other than on a single NeXT Computer in conjunction with a single
NeXT Printer.  You are free, however, to transmit and print
PostScript language files you create with the NeXT Software on
any printer.


0.9 (2/89):

5. PRINTING
The NeXT Preliminary Software is intended to be used to generate
screen displays with resolutions of less than 150 dots per inch
on a NeXT Computer and to print images with print resolutions of
up to 600 dots per inch on a NeXT Printer.  You agree not to make
use, directly or indirectly, of the PostScript software included
with the NeXT Preliminary Software to print bitmaps with print
resolutions of 150 dots per inch or greater, or to generate fonts
or typefaces, other than on a single NeXT Computer in conjunction
with a single NeXT Printer.  You are free, however, to print
PostScript language files you create with the NeXT Preliminary
Software on any printer.


0.8 (12/88):

5. PRINTING
The NeXT Preliminary Software is intended to be used to generate
screen displays with resolutions of 92 dots per inch on a NeXT
Computer and to print images with print resolutions of up to 400
dots per inch on a NeXT Printer.  You agree not to make use of
the NeXT Preliminary Software, directly or indirectly, to print
bitmap images generated by the NeXT Preliminary Software, or to
generate fonts or typefaces, other than on a single NeXT Computer
in conjunction with a single NeXT Printer.

					-=EPS=-