Postscript help page

If you have had problems viewing any of the files on the publications page on our server, then this help page is for you.

Postscript files have been stored here in gzipped Postscript format. In other words, the original Postscript file has been compressed using the standard gzip utility, available from many archives. This reduces the size of the file by an order of magnitude, and so saves you time, and saves everybody valuable network bandwidth.

Normally, your browser will automatically de-compress the file when it arrives at your end and display it using a helper application like gv, gsview, ghostview or xpsview.

However, if get no viewable output, or errors from the helper application, then you have a problem.

Does your browser have a Postscript helper application ?

Of course, if your browser doesn't support viewing of the postscript file, and just allows you to save the file on disk, then you (or your local system manager) may want to install a postscript viewer and make sure that your browser knows about it as a helper application.

Does your browser have a gzip utility available to it ?

In order to gunzip the gzipped Postscript file, your browser may need a gzip utility in the command search path. For example, Netscape version 3 does, and goes into a loop if it's missing when it is needed! If in doubt, try the command gzip -h to ensure it exists. It's conceivable that some browsers do the gunzip internally of course.

Does your browser recognise Content-Encoding: gzip ?

One known problem is that old browser versions (like Netscape prior to version 3) do not by default recognise the
  Content-Encoding: gzip
field in the HTTP header. (A HTTP header is a few lines of description which a Web server prefixes on to every document it serves, and its format is defined in the RFC documents for HTTP). This encoding was envisaged in the RFC for HTTP/1.0 and it was formalised with the RFC for HTTP/1.1, and is what our server software CERN-httpd-3.0A uses for gzipped files.

Older browsers may just recognise the

  Content-Encoding: x-gzip
type which was used earlier before formalisation. This is despite a recommendation in both HTTP documents that browsers should accept both forms!

Note that this HTTP header field is in addition to the

  Content-Type: application/postscript
field which also will be present in the HTTP header.

How to fix Netscape to recognise Content-Encoding: gzip

First option:
upgrade to Netscape version 3 or later!
Second option:
apply a change to the Netscape application defaults file. The Netscape application defaults file is a resources file that is read by Netscape when it starts up on X-window-based systems such as UNIX®. Netscape for other operating systems may have a similar file but I don't know the details of these, though I'm willing to be informed!

As supplied this file is named Netscape.ad, though in practice the working copy of it on your system may be simply called Netscape so that it can be used in an application defaults directory. On a multi-user or distributed system, this file is likely to be under the control of your system manager.

Part of this file, defining the resource *encodingFilters, will need to be updated. Here is an excerpt from the Netscape 3 application defaults file which shows how it should look in earlier versions as well:

*encodingFilters: \
     x-compress :  : .Z     : uncompress -c\n\
     compress   :  : .Z     : uncompress -c\n\
     x-gzip     :  : .z,.gz : gzip -cdq\n\
     gzip       :  : .z,.gz : gzip -cdq\n
You may already have the lines beginning x-compress and x-gzip but you also need the lines beginning compress and gzip. Be careful you get the backslashes right!
Third option:
Update your personal X-resources to match the above.

An immediate work-around for the problem

As an immediate work-around for the above problem, browsers such as Netscape allow you to use your Shift key with mouse button 1 when you click on a Postscript link; you will be prompted to save the file on disk rather than display it. Then you can gunzip the file by hand and view the Postscript file that results.

Disclaimer

The above is based on my current understanding of problems that some users have had with compressed Postscript files on this and other servers: if you are more expert than I am in this matter then please get in touch!
Questions/comments to LSL.
Copyright © L.S.Lowe, Birmingham, UK.