[comp.windows.x] How to display a postscript file in X windows?

farshid@walt.cc.utexas.edu (Farshid Arman) (10/02/90)

I have a drawing in the postscript format and I would like to display
the file on an X window.  Just incase there is an easy way to do this
I would be very thankful if someone would let me know!

farshid@zeus.ee.utexas.edu

fgreco@donald.GOVt.shearson.COM (Frank Greco) (10/05/90)

Farshid,

Are you using the vanilla X11R4 server or are you using Sun's OpenWindows or
are you using DEC's DECWindows?  Because you can ralpage or xps on X11R4, use
Display Postscript on DEC's product or use a multitude of things with OpenWindows
(cuz Postscript is spoken fluently by the thing ... see pageview(1) there as a sample).


Frank G.

gwh@penguin.inmos.co.uk (Graham Hudspith) (10/06/90)

Why has no-one in this thread mentioned Ghostscript 2.0 ??
This lets you display Postscript on both X11R4 and Sunview screens
and is a HUUUUUUUUUGE improvement over previous versions.

Using X resources you can fool Ghostscript into thinking that your screen
has (for instance) 300dpi rather than 72dpi, which some people have been
asking for.

It can display almost all the demo postscript files given with XView 2.0.

And it is far, far better than xps, xralpage, ralpage, ...
At least there is a recognised set of people supporting Ghostscript,
whereas Crispin Goswell (the original writer of ralpage) seems to have
got sick of it or lost access to the net.

The only problem with Ghostscript is that the fonts (of which there are
a lot now, not just "ugly font") are a bit "lumpy". This, presumably,
is because they were quickly hacked by converting the MIT X11 fonts,
and new, nicer, fonts are under developement.

Come on, try it, you'll enjoy it.

Graham Hudspith


-- 
Graham W. Hudspith  INMOS Ltd, Bristol | EMail(UK) ukc!inmos!gwh
---------------------------------------|     or    gwh@inmos.co.uk
I wouldn't give a XXXX for any other   | Internet: gwh@inmos.com
  windowing system                     | UUCP:(US) uunet!inmos.com!gwh

yiannis@HITCHCOCK.ENG.UIOWA.EDU (Yiannis Papelis) (10/07/90)

I have to agree about ghostscript.  Version 2.0 is much better than
version 1.X which I couldn't even get to compile correctly on a sun.
It is significantly faster than ralpage on almost any kind of graphics
too.

BTW, has anybody managed to compile it for a PC yet?

Yiannis Papelis
yiannis@hitchcock.eng.uiowa.edu
Dept. of Electrical and Computer Engineering
University of Iowa

moraes@cs.toronto.edu (Mark Moraes) (10/08/90)

gwh@penguin.inmos.co.uk (Graham Hudspith) writes:
>Why has no-one in this thread mentioned Ghostscript 2.0 ??

Because it was discussed in a thread a few weeks back?
Because it is mentioned in the Frequently Asked Questions posting?
[Perhaps the FAQ should be updated to mention version 2.0,
 and give it precedence over xps -- gs2.0 is MUCH better]

To forestall the inevitable "where can I get GhostScript", here's
the scoop that Graham omitted:

prep.ai.mit.edu:pub/gnu/ghostscript-2.0.tar.Z
prep.ai.mit.edu:pub/gnu/ghostscript-2.0fonts.tar.Z
prep.ai.mit.edu:pub/gnu/ghostscript-2.0hershey.tar.Z
prep.ai.mit.edu:pub/gnu/ghostscript-2.0paintjet.tar.Z

For those who cannot ftp, try osu-cis or uunet (if you're a client).

tut.cis.ohio-state.edu:pub/gnu/ghostscript/
uunet.uu.net:gnu/ghostscript-2.0.tar.Z
uunet.uu.net:gnu/ghostscript-2.0fonts.tar.Z
uunet.uu.net:gnu/ghostscript-2.0hershey.tar.Z
uunet.uu.net:gnu/ghostscript-2.0paintjet.tar.Z

Sites on ONET/CANET (Canada) can get it from

cs.toronto.edu:pub/X/ghostscript-2.0.tar.Z
cs.toronto.edu:pub/X/ghostscript-2.0fonts.tar.Z
cs.toronto.edu:pub/X/ghostscript-2.0hershey.tar.Z

	Mark.

hughes@packrat.csee.usf.edu (Ken Hughes) (10/08/90)

In article <90Oct7.162046edt.665@smoke.cs.toronto.edu>,
moraes@cs.toronto.edu (Mark Moraes) writes:
|>gwh@penguin.inmos.co.uk (Graham Hudspith) writes:
|>>Why has no-one in this thread mentioned Ghostscript 2.0 ??
|>
|>Because it was discussed in a thread a few weeks back?
|>Because it is mentioned in the Frequently Asked Questions posting?
|>[Perhaps the FAQ should be updated to mention version 2.0,
|> and give it precedence over xps -- gs2.0 is MUCH better]
|>
|>To forestall the inevitable "where can I get GhostScript", here's
|>the scoop that Graham omitted:
|>

Just a suggestion; since this question is asked about once a week anyway,
how about including some answer in the "Frequently Asked Questions" posting?
                               
-----------------------------------------------------------------------------
Ken Hughes  (hughes@sol.csee.usf.edu) |  "If you were happy every day of your
FT-Ph D student, PT-ex-sysadm	      |   your life you wouldn't be a human
Dept of Comp Sci and Eng	      |   being, you'd be a game show host."
University of South Florida	      |     Winona Ryder, from _Heathers_
---------------------------------------------------------------------------

datri@convex.com (Anthony A. Datri) (10/08/90)

>|>[Perhaps the FAQ should be updated to mention version 2.0,
>|> and give it precedence over xps -- gs2.0 is MUCH better]

Yeah, and Ultrix 4.0 is "MUCH better" than Sun's 1.1 release.  Be fair here --
ralpage, the later release of xps, is much better than xps.  It also does a
better job with text than gs2.0 does.

--

spqr@ecs.soton.ac.uk (Sebastian Rahtz) (10/09/90)

In article <9010062230.AA07219@hitchcock.eng.uiowa.edu> yiannis@HITCHCOCK.ENG.UIOWA.EDU (Yiannis Papelis) writes:


   BTW, has anybody managed to compile it for a PC yet?

(it = ghostscript). yes, its easy and it works well. in fact, rather
faster than under X. The problem with both is the rather `bare bones'
interpreter offered. Its not really very suitable for eg previewing
large documents.


--
Sebastian Rahtz                        S.Rahtz@uk.ac.soton.ecs (JANET)
Computer Science                       S.Rahtz@ecs.soton.ac.uk (Bitnet)
Southampton S09 5NH, UK                S.Rahtz@sot-ecs.uucp    (uucp)

moraes@cs.toronto.edu (Mark Moraes) (10/12/90)

datri@convex.com (Anthony A. Datri) writes:
>>|>[Perhaps the FAQ should be updated to mention version 2.0,
>>|> and give it precedence over xps -- gs2.0 is MUCH better]

>Yeah, and Ultrix 4.0 is "MUCH better" than Sun's 1.1 release.  Be fair here

At present, the FAQ mentions xps.  All I suggested was that it should
mention gs2.0 and give it precedence over xps.  Which is fair.  [My
comments on Ultrix I will leave out of this newsgroup -- this is a
family forum... :-] The FAQ could mention ralpage as well.  I think
gs2.0 performs better than ralpage on all the PostScript I threw at it.
Then again, I haven't stayed current on ralpage fixes.

People running gs2.0 on servers that support backing store (eg.  MIT
R4 Xsun) may find it far faster if they apply the following fix -- it
stops it from drawing everything into a backing pixmap as well as the
screen and instead turns on backing store. (Statutory warning to ward
off the X Division of the Softies:  the server may choose to not
honour the backing store request and all those carefully drawn bits
will vanish.)  Perhaps use_backing should be an option...

	Mark.

*** /tmp/,RCSt1a08343	Fri Oct 12 04:40:50 1990
--- gdevx.c	Fri Oct 12 03:53:13 1990
***************
*** 48,54 ****
  /* Define whether to use a backing pixmap to handle expose events. */
  /* Note that this is a variable rather than a #define. */
  /* Note also that it is consulted each time we open an X device. */
! private int use_backing = 1;
  
  /* Define the maximum size of the temporary pixmap for copy_mono */
  /* that we are willing to leave lying around in the server */
--- 48,54 ----
  /* Define whether to use a backing pixmap to handle expose events. */
  /* Note that this is a variable rather than a #define. */
  /* Note also that it is consulted each time we open an X device. */
! private int use_backing = 0;
  
  /* Define the maximum size of the temporary pixmap for copy_mono */
  /* that we are willing to leave lying around in the server */
***************
*** 390,395 ****
--- 388,394 ----
  	xswa.event_mask = ExposureMask;
  	xswa.background_pixel = xdev->black;
  	xswa.border_pixel = border_color;
+ 	xswa.backing_store = Always;
  	xdev->win = XCreateWindow(xdev->dpy, RootWindowOfScreen(scr),
  				  sizehints.x, sizehints.y, /* upper left */
  				  sizehints.width, sizehints.height,
***************
*** 397,403 ****
  				  DefaultDepthOfScreen(scr),
  				  InputOutput, /* class */
  				  xdev->vis, /* visual */
! 				  CWEventMask | CWBackPixel | CWBorderPixel,
  				  &xswa);
  	if ( use_backing )
  	  xdev->bpixmap =
--- 396,403 ----
  				  DefaultDepthOfScreen(scr),
  				  InputOutput, /* class */
  				  xdev->vis, /* visual */
! 				  CWBackingStore | CWEventMask |
! 				  CWBackPixel | CWBorderPixel,
  				  &xswa);
  	if ( use_backing )
  	  xdev->bpixmap =