PostScript and PDF out of StarOffice Writer

A short word before we start. Unfortunately, some of the pix in that document are in German language. The reason for that is I simply do not have an English copy of Windows installed on my box. So if you can help us out please do not hesitate to send these to Werner Roth.

What do I gain from that?

How do I create such a PostScript file?

Installation of a PostScript Viewer

Configure GSview as Viewer in StarOffice

Create a PDF-Document



What do I gain from that?

PostScript is a language tailored to describe what is to be shown on a sheet of paper. You also might refer it to a graphic format. (FAQ). Please note, that document is mainly intended for Windows users. Under UNIX operating systems StarOffice will create PostScript files as default.

How do I create such a PostScript file?

With a simple printer driver you can create PostScript files basically from any application which can print. The following is shown for Windows32 only. The other method is using external programs as mentioned at the end of this text.

Install a PostScript Printer Driver

As a PostScript printer driver you should choose a simple PostScript printer. As good choice has turned out the Apple Laserwriter from the Windows install CD. If you do not know how to install a printer for Windows please have a look in the Windows documentation. As the connection you may not choose FILE since some applications do not show printers which are connected to FILE. However, for StarOffice FILE works fine.

Another option is to use the printer driver from Adobe which are freely available for Windows9x, Windows NT and Macintosh. BTW, Adobe is the inventor of PostScript and PDF. Furthermore, Adobe offers a wide variety of so called PPDs. A PPD (PostScript Printer Description) file describes the capabilities and properties of your printer. That might be the page size, resolution, etc.

Here are the links:

Adjustment of the Printer driver

The printer driver will output PostScript code tailored especially for the installed printer (remember you determine that printer by the PPD file). If you plan to share the PostScript documents with other people or you plan to print it on a different printer you must tell that the printer driver. Do the following.

Open the properties of the printer. Choose the tab PostScript and select Archive Format as the output format under PostScript output Format.

Under Advanced untick the options Send CTRL+D before job and Send CTRL+D after job.

Create a PostScript document

In order to create a PostScript document simply choose Print... form the File menu and select your formerly installed PostScript printer. In the Print dialogue tick File to print into a file. As file extension you should use .PS (and not .PRN what Windows might suggest). If you can't find your PostScript document afterwards open „My Windows“ and look for it using the <F3> dialogue.

Installation of a PostScript Viewer

No surprisingly, to render a PostScript file on your screen or to feed it to your printer you need a special application. That software is called PostScript Software RIP. A widely used tool for that is Ghostscript in combination with Ghosview. That useful tool is available for many many platforms for free. The home page of Ghostscript and GSview can be found on: http://www.cs.wisc.edu/~ghost/index.html

The latest version of Ghostscript and GSview in two single archives can be found here:
ftp://ftp.cs.wisc.edu/ghost/ghostgum/gsv29w32.exe (ca. 1 MB)
ftp://ftp.cs.wisc.edu/ghost/aladdin/gs601/gs601w32.exe (ca. 5 MB)
Please make sure to use a mirror next to you. One is here ftp://ftp.uni-magdeburg.de/pub/mirror/ftp.cs.wisc.edu/ (or just fire up Fast FTP Search).

Please have a look under http://www.cs.wisc.edu/~ghost/index.html if there is a more recent version than 6.01.

Configure GSview as Viewer in StarOffice

To make life easy you might expect a PostScript file opened by a double click in StarOffice. No problem. StarOffice has to learn that it has to open the PostScript file with Ghosview. Therefore go to Tools\Options...\Browser\File Types. There you have to register a MIME-Type.

Mime-Typ: application/postscript

 

Clipboard - Id: none

Open with: External

Extension: *.ps;

Application: <Path>gsview32.exe



Create a PDF-Document

PDF (Portable Document Format) is a file format by Adobe which allows to render documents on different platforms not depended on locally installed fonts etc. It is rather simple to create such a PDF file from a PostScript document using e. g. Ghostview/Ghostscript.

  1. Load the PostScript document into Ghostview.

  2. Print the PostScript document using Ghostview to the device pdfwrite. Note, „PostScript Printer“ has to be unticked and you have to print to a file.

Obviously, it would be much nicer to print to a PDF directly. Even that can be done via Ghostscript using the virtual printer driver RedMon - Redirection Port Monitor (ftp://ftp.cs.wisc.edu/ghost/ghostgum/redmon13.zip (ca. 0,5 MB)). I am going to explain all the single steps here. However, I recommend to do that only for people with some experience in Windows.

The following steps are necessary:

Here we go. Download RedMon and install that beast. Please read the help file redmon.hlp which is provided. It explains the installation and configuration in great detail. The documentation assumes a HP DeskJet 500-printer. I will just tell you here the difference to that.

As a next step you have to install a PostScript printer driver which is used for the PDF output. Again, I used the Apple LaserWriter for that. As the printer device you can use whatever you want. It will be redirected later on anyway. After you installed the printer driver open the Windows printer setup and there the printer properties.

Now follow the configuration guide in the RedMon-help Installation|Ghostscript-Example (You also can find that on-line.). Instead of c:\gstools\djet500.rsp create the file c:\Aladdin\pdffile.rsp with the following contents (adjust folder names):

-Ic:\Aladdin\gs6.01\lib;c:\Aladdin\fonts
-dNOPAUSE
-sDEVICE=pdfwrite

You can see the changed device properties in the next figure (Sorry, I know it is German). In the line containing the program arguments ("Argumente für dieses Programm") you see the substitute %d right behind -sOutputFile. It stands for the filename passed by the printing application. So the file MyDocument.sdw will be printed to the PDF-file MyDocument.pdf. This hint was coined by Michael Fleischer. Sadly this adoption of the filename is not working on my system. Please mind the final „-“ in this line.

"Ablauf" means run mode and should be set to background mode.

Michael Fleischer also mentioned to increase the "Schliessverzögerung" (shut down delay?) to 600 seconds and the "Wartezeitlimit" (latency limit?) on the tap page PostScript in your printer driver configuration to 600 seconds, too.

No follow the RedMon installation guide and be happy about your new PDF-printer driver. Personally, I only use that printer driver for test purposed. Please let me know if you encounter problems.

Here a remark from Frank Schmerler, he assumes to delete the "-dNOPAUSE" entry in pdffile.rsp. He had trouble printing huge documents and can't find a difference between working with "-dNOPAUSE" or not.

Using other Software Products

PDFs can be created with commercial software by Adobe or NikNak as well. In my personal opinion these tools are more powerful at the moment. That gap might vanish in a couple of month / years.

You can use HTMLDOC of Easy Software Products to generate PDFs directly from HTML documents. It is available for a various range of platforms. Download it from http://www.easysw.com/htmldoc/. Take a look at there licence (GPL). The actual version 1.8.6 can't handle tables generated by StarOffice Writer/Web. To workaround this load and save such documents in Netscape Composer.

PDF files have proven to be very convenient. You easily can distribute documents via a network, you can show StarOffice Impress presentations without StarOffice or you can store an archive of a form letter...

Author: Werner Roth Translation by Frank Becker The original can be found on http://www.wernerroth.de/en/staroffice/dokus/

© 2000 Legal Notice