A tool for publishing Postscript documents on the web
ps2www is a Perl script that uses ghostscript and the netpbm tools to publish your Postscript documents in Postscript, PDF, and GIF formats. HTML pages are created to link to and present each format. Here is an example.
David Anderson
ps2www freely available and you are encouraged to distribute it but do not offer it for sale or modify it without notifying me. Please give me any suggestions you may have for improving ps2www. I will gladly incorporate your improvements (if I can) and give you credit.
To save ps2www to your disk you may need to click on the following link with the right mouse button and select save link as, or whatever the equivalent is for your browser.
To install ps2www simply save the script, change its permissions to make it executable and place it in your path.
You will need to have Perl, Aladdin Ghostscript version 4.x or later (preferably version 5.10), and the netpbm tools installed on your system to use ps2www. These are usually installed on Unix systems but the version of Ghostscript is often older and will need to be updated. (This is because Unix systems are usually distributed with the GNU licensed version and not the Aladdin version.) Older versions of Ghostscript will not handle as many Postscript documents and the quality of the GIF files is much poorer because it does not perform anti-aliasing on the fonts.
The basic method of invoking ps2www to publish myfile.ps on the web is as follows:
ps2www myfile "The title for the html document"
This will create the following:
| myfile.html | This is the file that you should link to. It is a wrapper files containing links to each version of the document |
| myfile.pdf | This is created by ps2www only if it does not already exist. This is because the PDF files created by Ghostscript do not have any compression so if you create one using Adobe Acrobat then we do not want to overwrite it. You can force the creation of myfile.pdf with the -p command-line option. |
| myfile_n.html | Created to display the GIF image of the nth page. |
| myfile_n.gif | A GIF image of the nth page. |
The following command line options affect the behavior of ps2www:
I intend to add some switches allowing you to specify HTML code to be inserted.
This is my first Perl program so I can't warrantee it in any way. It has worked well for those of us who have used it in conjunction with the Computer Enhanced Education project at Georgia Tech but I can't promise that it will work in any given situation.
Also, Adobe, Acrobat, and Postscript are trademarks of Adobe Systems Incorporated.
Click here to return to David's Homepage.
You are visitor # since 5/5/98.