HDTenEightyP/NetNews huggingface dataset:
From: e-sink@uiuc.edu (Eric W. Sink)
Subject: xv: printing images
Originator: sink@ux2.cso.uiuc.edu
Reply-To: e-sink@uiuc.edu
Organization: University of Illinois at Urbana
Date: Wed, 16 Dec 1992 14:44:24 GMT

xv is an X image program which can output its images in PostScript.
It outputs color images, using the colorimage operator.  In the
setup, it checks to see if the colorimage operator is actually
available, and if it is not, it defines one.  That PostScript code
for procedure definitions appears below.  The problem is, that if I
print a large image on a printer which is a little short on RAM, the
operation fails due to lack of memory.

Now for the question:
	Can the code below be modified to make it more efficient with
	memory?  The goal is to allow it run on more printers if
	possible.

% define 'colorimage' if it isn't defined
%   ('colortogray' and 'mergeprocs' come from xwd2ps
%     via xgrab)
/colorimage where   % do we know about 'colorimage'?
  { pop }           % yes: pop off the 'dict' returned
  {                 % no:  define one
    /colortogray {  % define an RGB->I function
      /rgbdata exch store    % call input 'rgbdata'
      rgbdata length 3 idiv
      /npixls exch store
      /rgbindx 0 store
      /grays npixls string store  % str to hold the result
      0 1 npixls 1 sub {
        grays exch
        rgbdata rgbindx       get 20 mul    % Red
        rgbdata rgbindx 1 add get 32 mul    % Green
        rgbdata rgbindx 2 add get 12 mul    % Blue
        add add 64 idiv      % I = .5G + .31R + .18B
        put
        /rgbindx rgbindx 3 add store
      } for
      grays
    } bind def

    % Utility procedure for colorimage operator.
    % This procedure takes two procedures off the
    % stack and merges them into a single procedure.

    /mergeprocs { % def
      dup length
      3 -1 roll
      dup
      length
      dup
      5 1 roll
      3 -1 roll
      add
      array cvx
      dup
      3 -1 roll
      0 exch
      putinterval
      dup
      4 2 roll
      putinterval
    } bind def

    /colorimage { % def
      pop pop     % remove 'false 3' operands
      {colortogray} mergeprocs
      image
    } bind def
  } ifelse          % end of 'false' case


-- 
Eric W. Sink, Spyglass        | "You are the Pan."
1800 Woodfield Drive          |     - Rufio
Savoy, IL  61826              |
---- e-sink@uiuc.edu ---------|---------- 217-355-6000 -----------------------
Newsgroups: comp.lang.postscript
From: shaver@convex.com (Dave Shaver)
Subject: Re: can I print a mirrored page???
Date: Fri, 11 Dec 1992 20:34:34 GMT
Organization: CONVEX Computer Corp, MPP System Software, Richardson, TX
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

graphics@selas.iesl.forth.gr (Graphics Team (PIT)) writes:
>	I would like to know if it is possible to print a page (text) in
>a mirrored way

Yes.  Do an appropriate translate, then "-1 1 scale".  Like this:

/mirror { 8.5 72 mul 0 translate -1 1 scale } def

To avoid the nasty A4 v. US paper problem, you could use the initial
clippath and assume that's the size of the renderable page.

/\  Dave Shaver
\\  CONVEX Computer Corporation, Richardson, TX
\/  Internet: shaver@convex.com    UUCP:  uunet!convex!shaver
From: cupak@rapnet.sanders.lockheed.com (John J Cupak Jr CCP)
Newsgroups: comp.lang.postscript
Subject: Re: Recycle.ps responses
Date: 16 Dec 92 15:35:25 GMT
Article-I.D.: Rapnet.1992Dec16.153525.28387
Reply-To: cupak@rapnet.sanders.lockheed.com (John J Cupak Jr CCP)
Organization: Lockheed Sanders, Inc.


Many thanks to all those who responded to my request for a postscript recycle
"program". I received 7 different versions! I am now recycling all the output
I generated! :-)
--
John J. Cupak, Jr., CCP       Lockheed DECNet: MERVAX::CUPAK
Lockheed Sanders, Inc.        Internet       : cupak@rapnet.sanders.LOCKHEED.COM
95 Canal Street / NCA15-221   CompuServe     : 72411,3176 
Nashua, NH 03061-0868         Telephone      : (603) 885-2134     FAX: 885-8033
Newsgroups: comp.lang.postscript
From: henry@trilithon.mpk.ca.us (Henry McGilton)
Subject: Re: Need postscript library callable from C
Organization: Trilithon Software
Date: Mon, 14 Dec 1992 23:21:30 GMT

In article <1992Dec14.192801.24379@cs.brown.edu>  writes:

        **  > Is there any public domain postscript library that is
        **  > callable from C?

    *  It depends what you want to draw.
    *  I've written programs both for:

    *  1. drawing a picture which is to be viewed later and  2.
    *  drawing a picture which is to be viewed while the program's
    *  running

    *  I can email sample code to anyone who is interested in this
    *  stuff.  Basically, however, it's just a matter of sending
    *  PostScript commands either:
    *  1. to a file or 2. to GhostScript, using the "flushpage"
    *  command to force the screen to be updated
    *  And this means that you have to know PostScript programming.
    *  If there were some library calls, there would be a very
    *  simple mapping to PostScript, so you either learn the
    *  library or you learn PostScript.
    *  Learning some simple PostScript is not hard.

    *        psline(x1, y1, x2, y2)
    *        printf("%d %d moveto %d %d lineto stroke\n", x1, y1, x2, y2);

          <<<<<  Stuff Deleted  >>>>
The list of library calls presented here bears a passing resemblance
to the client side library of Display PostScript.

But apart from that, the October 1989 issue of EPODD* contains an
article titled ``INSCRIPT -- A C like preprocesor for POSTSCRIPT''.
The article is by Jacob Gonczarowski and On G. Paradise.  Jacob
Gonczarowski is or was at Typographics, Jerusalem, and On G. Paradise
is or was at the Hebrew University of Jerusalem.

* Electronic Publishing -- Origination, Dissemination, and Design.

	........  Henry

Newsgroups: comp.lang.postscript
From: "jeff zeitlin" <jeff.zeitlin@execnet.com>
Newsgroups: comp.lang.postscript
Subject: goscript
Date: 12 Dec 92 11:41:37 EST
Reply-To: "jeff zeitlin" <jeff.zeitlin@execnet.com>
Distribution: comp
Organization: Executive Networks Information

NH::>Firstly, does anyone know if this product is any good?
  ::>Secondly, does anyone know if it will work on my LX-800?

  Firstly:  I used to use this program (until I ran out of disk space; 
  GoScript was the first thing that went - it's huge).  I liked it, 
  although occasionally it would break on PS files that were perfectly 
  O.K. when dumped to a real PS printer.  I reported the bugs; some of 
  them got fixed, some didn't. (I no longer use it; I've got a 
  TrueType system.)

  GoScript supplies its fonts in a proprietary format.  It will take 
  type 1 and 3 Adobe fonts, but because of the way it handles them (as 
  opposed to the way it handles its proprietary format), you will not 
  be able to include more than two or three Adobe fonts in a PS 
  document.  Very nasty restriction, as there aren't a lot of GoFonts 
  (the proprietary format) beyond the "standard" 35 and the most 
  common decoratives.

  GoScript is something of a resource hog; the driver simply converts 
  the PS code into a bit map in memory (If you're lucky, and have XMS 
  or EMS - 1 to 1.5 Meg per page, depending on printer resolution) or 
  on disk (if you're not lucky - same requirement), and when it hits 
  the showpage, it shovels the bit map out to your printer.  
  Slooooooooow!

  Secondly:  I believe that the LXs are compatible with either the LQs 
  or the FXs (I forget which), so you should be able to use one of 
  those drivers.  There may also be a LX driver; they added a bunch of 
  drivers when they released the 3.0 version (I started with 2.0 and 
  upgraded to 3.0), and I simply don't recall whether the LX was one 
  of the new drivers.

  Overall rating: 4.5 - 5.5 (1 to 10 scale, 10 best).
  Best feature: Wide range of printers supported.
  Worst feature: Unpredictability as to when you'll exceed its 
  capacity.
  Drawbacks: slow, limited capability to handle 3rd party fonts, large 
  resource requirements, erratic bugs.
  Worth it?  Call it, based on your own needs.  Once I got Win31 and 
  TT, no.

  J/
  jeff.zeitlin@execnet.com
---
  QMPro 1.0 41-4533  Printer paper is always strongest at the perforation.
--
Executive Network Information System  (914) 667-4567
International ILink Host
Newsgroups: comp.lang.postscript
From: jchauvin@netcom.com (John H. Chauvin)
Subject: FORTRAN carriage control characters to postscript
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Fri, 18 Dec 1992 02:25:08 GMT

I am currently working on a Silicon Graphics Crimson workstation running IRIX
4.0.5 unix operating system. I use a FORTRAN program which output a file which
contains line printer vertical carriage control characters in column 1. I use
the program lptops to convert the file to postscript for printing on a Apple
laserwriter. My problem is the carriage control characters are not recognized
by the lptops program. Does anyone know how I can convert the carriage control
characters to something that lptops can understand?

Thanks

jchauvin@netcom.com 
-- 
John H. Chauvin jchauvin@netcom.COM
Netcom - Online Communication Services San Jose, CA
Newsgroups: comp.lang.postscript
From: scowen@wfpc3.la.asu.edu (Paul A. Scowen)
Subject: Re: Mac To Unix PostScript Files
Organization: Dept. of Physics & Astronomy, Arizona State University
Date: Fri, 11 Dec 1992 17:54:29 GMT

In article <1gaegqINNpha@rave.larc.nasa.gov>, wjb@cscsun2.larc.nasa.gov (William J. Bene) writes:
|> I have ported a postscript file generated by System 7's print option to a Sun 
|> Workstation and have not been successful downloading to the connected 
|> LaserWriter IINT. I can view the file using PageView, but when I download it 
|> it locks the printer up.  

Could this be caused by the fact that files created on the Mac end comes across
as one line of text.  Previewers like Ghostscript don't object to this, but
if the file is very large, the printer might have memory problems.  

In a similar vein, does anyone have a simple piece of code, or csh script
that will replace the ctrl-M's with UNIX <cr>'s?

-- 
-------------------------------------------------------------------------------
Paul A. Scowen				INTERNET: scowen@wfpc3.la.asu.edu
Department of Physics & Astronomy		  uk1@spacsun.rice.edu
Arizona State University		Tel:      (602) 965-0938
Tempe, AZ 85287-1504			FAX:      (602) 965-7954
-------------------------------------------------------------------------------
Newsgroups: comp.lang.postscript
From: zisk@adobe.com (Stephen Zisk)
Subject: Re: Postscript film-recorder
Followup-To: comp.lang.postscript
Organization: Adobe Systems Incorporated
Date: Fri, 11 Dec 1992 21:22:29 GMT

In article <1992Dec10.232840.730@cine88.cineca.it>, paolo@deis102.cineca.it
(Paolo Ciampolini) wrote:
>   Does anybody know if a 35mm film-recorder exists, having an on-board
>   Postscript interpreter?

Agfa makes a number of film recorders which handle 35mm film under the
"ChromaScript II" brand name. These include the PCR II, the ProColor
Premier, and the Forte. Many service bureaus also have these things,
which is a good alternative, as they are fairly expensive (at least
when compared with a B/W 300 dpi laser printer ;-).

Stephen Zisk (zisk@adobe.com)  Disclaimer: These are my personal views
Adobe Systems Incorporated     and do not represent the position of
Eastern Regional Office        Adobe Systems Incorporated.
24 New England Exec. Park
Burlington, MA 01803           They pay me but they don't muzzle me!
From: chrisa@world.std.com (Chris N Anderson)
Newsgroups: comp.lang.postscript
Subject: .PFM format, anyone?
Summary: Need pointer to PFM (compressed AFM) format
Date: 13 Dec 92 16:42:08 GMT
Organization: The World Public Access UNIX, Brookline, MA

The FAQ gives good pointers to tools for dealing with PFB files, but
no reference is made to PFM files (which are the compressed form of
AFM font metric files used by Adobe Type manager.)

I have to move some custom Type 1 fonts onto a PC, so must translate
the AFM ascii files to PFM binary ones somehow... 

Any pointers would be much appreciated - and maybe this is a candidate
for FAQ-ing?

Chris Anderson
	chrisa@world.std.com
From: zisk@adobe.com (Stephen Zisk)
Newsgroups: comp.lang.postscript
Subject: Re: DPS Color use
Date: 11 Dec 92 20:47:41 GMT
Followup-To: comp.lang.postscript
Organization: Adobe Systems Incorporated

In article <MSL9EGP@math.fu-berlin.de>, beck@irzr17.inf.tu-dresden.de
(Andre Beck) wrote:
> How do I get a 1280x1024 pixel image that uses less than 256 colors
> on the display WITHOUT any dithering ? In other words, how can I force
> the XDPS system to allocate new colors ?

Preface: I am not a DPS expert, but I do have a manual in front of me,
so here goes, and watch out for the trees!

You tell DPS what color table to use at context creation time. If you
use the XDPSCreateSimpleContext() call, you get a context with a default
color map: a 5x5x5 color cube, with dithering for missing colors. If you
use XDPSCreateContext(), the arguments include a color cube and a gray
ramp function.

Find your XDPSCreateSimpleContext call, which will have 8 arguments.
Change to be XDPSCreateContext, then after the fifth argument, insert
four more args:

    unsigned int eventmask;       /* unimplemented - use 0 */
    XStandardColormap *grayramp;  /* an XStandardColormap for grays */
    XStandardColormap *ccube;     /* ditto for a color cube */
    int actual;                   /* requests use of pure colors */

Set up your colormap so that there are n unused entries, and set
"actual" to TRUE. Now the first n color requests you make via DPS
will be allocated in the unused entries, and will be represented
as pure colors.

This is all documented in the "X Window System Programmer's Supplement
to the Client Library Reference Manual," avaialble from Adobe.

Simple and obvious, n'est pas? *NOT!*

Stephen Zisk (zisk@adobe.com)  Disclaimer: These are my personal views
Adobe Systems Incorporated     and do not represent the position of
Eastern Regional Office        Adobe Systems Incorporated.
24 New England Exec. Park
Burlington, MA 01803           They pay me but they don't muzzle me!
Newsgroups: comp.lang.postscript
From: henry@trilithon.mpk.ca.us (Henry McGilton)
Subject: Re: Justifying strings, how??
Organization: Trilithon Software
Date: Thu, 17 Dec 1992 01:11:25 GMT

In article <MEYER.92Dec16131125@ibsen.geomatic.no>  writes:
    *  I want to be able to justify strings; left, right and middle. How can
    *  I do this when almost all PostScript fonts are non-fixed fonts? How do
    *  I calculate where to put the string???
    *  Anybody have a piece of code, or a general idea of how to do this?
These kinds of calculations are trivially easy for the trivially
easy cases.  Following is some PostScript code taken from Chapter
3 of ``PostScript by Example'' by Mary Campione and Henry McGilton,
published by Addison-Wesley.  More fun starts when the strings to be
justfified are in multiple fonts -- we also discuss this case.

	........  Henry

Here cometh the code:
%!PS

%	This example appears in section "Justification Operations"
%	in Chapter 3 - "Text".
%

/inch { 72 mul } def		%  define inch procedure
/Palatino-Roman findfont	%  obtain font
1 inch scalefont		%  scale font to required size
setfont				%  set into graphics state
0.5 inch 5.5 inch moveto	%  set current point
(Left Text) show		%  show the string
showpage			%  display page

%!PS
%	This example appears in section "Justification Operations"
%	in Chapter 3 - "Text".
%

/inch { 72 mul } def		%  define inch procedure

/center_show {			%  stack =  x  y  (string)
	dup			%  make copy of string
	stringwidth pop 2 div	%  compute half string width
	4 -1 roll exch sub	%  decrement x position
	3 -1 roll moveto	%  set current point
	show			%  image string
} def

/Palatino-Roman findfont	%  obtain font
1 inch scalefont		%  scale font to required size
setfont				%  set into graphics state
4.25 inch 5.5 inch		%  current point
(Centered Text) center_show	%  show in middle of page
showpage			%  display page
%!PS

%	This example appears in section "Justification Operations"
%	in Chapter 3 - "Text".
%

/inch { 72 mul } def		%  define inch procedure

/right_show {			%  stack = x  y  (string)
	dup			%  make copy of string
	stringwidth pop		%  compute string width
	4 -1 roll exch sub	%  decrement x position
	3 -1 roll moveto	%  set current point
	show			%  display the string
} def

/Palatino-Roman findfont	%  obtain font
1 inch scalefont		%  scale font to required size
setfont				%  set into graphics state
8 inch 5.5 inch			%  current point
(Right Text) right_show		%  show string at right of page
showpage			%  display page
From: clindh@abalon.se (Christer Lindh)
Newsgroups: comp.lang.postscript
Subject: paragraph wrappin before printing
Date: 16 Dec 92 06:46:03 GMT
Distribution: comp
Organization: Abalon AB, Stockholm, Sweden


I'm in the need to wordwrap paragraphs etc into a specified width, and
I need to do this before sending to the printer.

Thus I could need some good algoritms for calculating string-lengths
(preferably including kerning), wrapping paragraphs (no hyphenation
needed) etc based on information in AFM-files (which I already have a
parser for).  References to books/papers/source are welcome too.

There used to be a document in the Adobe file-server called
"textcalc.ps" that supposedly covered some of these topics, but it's
not there anymore. Does anubody know the whereabouts of it?

Replies by mail preferred, I'll post a summary on demand.

-- 
::        clindh@abalon.se        ::   o/       ::                          ::
::  Abalon AB, Stockholm, Sweden  ::  /@        ::          Earth.          ::
::        59.19 N, 17.57 E        ::  <|\  acro ::   Love it or leave it.   ::
::    * All disclaimers apply *   ::   |   phil ::                          ::
Newsgroups: comp.lang.postscript
From: jeroenp@rulfc1.LeidenUniv.nl (Jeroen W. Pluimers)
Subject: Re: .PFM format, anyone?
Organization: Dept. FMC, Gorlaeus Labs, Leiden University, The Netherlands
Date: Mon, 14 Dec 92 20:44:16 GMT

In article <Bz7IE8.34K@world.std.com> chrisa@world.std.com (Chris N Anderson) writes:
>The FAQ gives good pointers to tools for dealing with PFB files, but
>no reference is made to PFM files (which are the compressed form of
>AFM font metric files used by Adobe Type manager.)

Get DUMPFM from cica.cica.indiana.edu (directory /pub/pc/win3/fonts).
It can dump .PFM files for you and gives insight in how .PFM files look like.

If I find some spare time, I still want to write an AFM to PFM conversion
program.  Well, maybe the last week of december....
--
jeroen                             voice: +31-2522-20908 (19:00-23:00 UTC)
                                   snail: P.O. Box 266
jeroenp@rulfc1.LeidenUniv.nl              2170 AG Sassenheim
jeroen_pluimers@f256.n281.z2.fidonet.org  The Netherlands
Newsgroups: comp.lang.postscript
From: odonnell@adobe.com (Terry O'Donnell)
Subject: font converters
Organization: Adobe Systems Incorporated
Date: Thu, 17 Dec 1992 00:50:51 GMT


In article <92350.114159AUBXG@ASUACAD.BITNET>
AUBXG@ASUACAD.BITNET (Ben Goren) wrote:

> The fonts I have are only being used on one machine and with one printer
> only. It is my understanding that this is perfectly legal, even though
> I've translated the fonts into more than their original format. If Adobe
> has a problem with that, well....

It is true that it is one machine and one printer - and the 
translation is fine as long as it is for your own use. Even 
though translation of copyrighted font software can be 
considered to be an infringement of the copyright, Adobe has 
stated publicly that it is permissible for individuals to do 
this for their personal use - if the copyright notice is 
retained. However, it is not permissible for anyone to 
redistribute, sell, or share on a server -  modified or 
translated font programs (some utilities may not retain the
copyright notice). The hope is that such conversions will
enhance the legal owner's utilization and enjoyment of their 
fonts.

> I'm not sure if the restriction is one copy per computer, or one copy
> per printer, or what. I've heard that it's OK to purchase an Adobe font,
> and distribute it to all the people on the network who print to the
> same printer. I've also heard that you can't do that. And what about
> ATM, if the first is true? Anybody at Adobe care to clear this up? 

The license is for one printer and one ATM. It is possible for 
multiple users to use copies of a single font - IF they all 
print to the same printer and they are NOT using ATM.

> And any other font vendors who might have a different policy?

Since much of Adobe's agreement is determined by the type foundries
we license the type from - I would think those vendors would have
similar policies - e.g. Linotype, Monotype, Agfa-Compugraphic, ITC,
etc. Other vendors, of course, may do it differently.

Terry O'Donnell
Adobe Developer Support
From: mparker@adobe.com (Mike Parker)
Newsgroups: comp.lang.postscript
Subject: Re: Adobe File Server
Date: 14 Dec 92 18:33:12 GMT
Organization: Adobe Systems Incorporated, Mountain View

In article <92348.014408U12570@uicvm.uic.edu> Ed Garay   (u12570@uicvm.uic.edu) <U12570@uicvm.uic.edu> writes:
>
>I don't think the FTP archive is complete yet; for instance,
>it doesn't have the new Technote 2012 on Adobe PostScript Fax
>which I am very interested in reading.
>
It's all my fault, Ed.  I sent you and several others mail stating that
the 2012 supplement had been posted to the server when in fact it had
only just been released to the server administrator.  Having looked
at the server since then, I can see that:

1.  It takes some work to put a file in the proper format to live on the
server and I should have allowed Debby 3 days instead of 3 hours.

2.  The 2012 supplement is there now.

The mail server effectively hades that fact that there is some heirarchical
structure to the way server documents are stored, ftp exposes this structure.
Hopefully this will not confuse users....

Also maybe a clarification of the exact contents of the document that you
are looking for.  The 2012 Supplement is a supplement the the Red Book that
describes all of the changes in Level 2 release 1.2, there is also a 2011
Supplement.  Since the fax capability is first found in 1.2, all of the
fax interface is documented in the 2012 Supplement.  However, the format
of the supplement is the same as the operators section of the Redbook.  In
other words, it is a reference rather than a tutorial.  The document
"Using PostScript Fax" is a tutorial intended for driver writers who
wish to support the fax capability.  It has completed one round of review
and should be available in January.

mike
Newsgroups: comp.lang.postscript