Webify: Some notes and hints
A newer, fancier, and apparently buggier version is distributed by Aladdin under
different terms; poke around
ftp://ftp.cs.wisc.edu:/pub/ghost/aladdin/
and you'll find version 3.12 along with fonts, fixes, and information.
In addition, I have been unable to get 3.12 to adjust gif8 device parameters (or those of other devices, for that matter) appropriately; for example, it seems unable to deal with landscape-format postscript files.
Until these problems with gs 3.xx are resolved, you may need to use gs 2.6.1 to webify postscript files, at least Powerpoint-generated postscript files, containing bitmap images. Its possible that there are other workarounds, such as generation of .eps (rather than .ps) files. You can specify an alternative Ghostscript command using the -g command option; for example, "webify -g "old/gs -Iold/ ..." can be used to run an old gs version and load its gs_init.ps file from its own directory.
If anyone takes the trouble to debug these problems, I'd love to hear about it. The Aladdin version of gs has many features that webify might utilize, including generation of JPEG images.
Before using webify to convert a postscript file, you'll probably want to customize a template for your own use. Edit webify.template; start with minor changes (like changing my name and email address -- at the bottom of the file -- to your own). If you know HTML and have a strong intuition, you'll immediately see how to make substantive changes; otherwise, you may want to make your changes more incrementally. Very little has to be changed to make the sample template useful for a wide variety of purposes.
To run webify on a UNIX system, type the command
webify <options> template file.ps
which will read specified template file as well as the postscript
file.ps, and generate a subdirectory ("named "file") containing
a tree of web pages whose root is named "index.html".
Template is a text file containing skeletal HTML, as well as escape sequences enclosed in curly brackets {...}. Click here to see a typical template (the one which generated the sample webify presentation). <options> allow various parameters to be specified in the command line rather than via escapes in the template; this allows a single template to be used for a variety of applications. For a summary of available options, invoke webify with no arguments as described above.
BUG: Under certain circumstances, Ghostscript loops forever when converting a file whose contents extend beyond page boundaries -- eg when you're over-cropping pages. Adjusting the cropping parameters to webify is the only way I know of to get around this problem currently.
Idiosyncrasy: The Mac driver inherits some parameters from the selected printer, even when producing postscript files rather than hard copy. For certain printers, the postscript -- hence the gif images -- are upside down. This can be accommodated via the -f command line option to webify, or via the {FlipPage} directive in the template file.
I'm currently searching for a solution to this problem; if any postscript wizards out there have a simple cure, I'd love to hear from you.
Thanks to all the users who conveyed bug reports, suggestions, improvements, and encouragement.
Steve Ward ... ward@mit.edu